forked from kodi-svtplay/xbmc-svtplay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·45 lines (37 loc) · 908 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Use this script to deploy to the XBMC/Kodi
# plugins repo.
if [ "$#" -ne 1 ]; then
echo "Missing argument for deploy dir!"
echo "Usage: deploy.sh /my/dir/repo-plugins/plugin.video.svtplay/"
exit 1
fi
if [ ! -d "$1" ]; then
echo "Directory $1 does not exist!"
exit 1
fi
# Exit on error
set -e
echo "Deploying to $1"
DEPLOY_DIR=$1
EXCLUDED_FILES="deploy.sh \
.gitignore \
__pycache__ \
.vscode \
.travis.yml \
requirements.txt \
ISSUE_TEMPLATE.md \
CONTRIBUTING.md"
FILES=`git ls-files`
for FILE in $FILES; do
if [[ $EXCLUDED_FILES =~ $FILE ]]; then
echo "Skipping excluded file $FILE"
continue
fi
if [[ $FILE == *"tests"* ]]; then
echo "Skipping test file $FILE"
continue
fi
echo "Copying $FILE to $DEPLOY_DIR$FILE"
cp --parent $FILE $DEPLOY_DIR
done