forked from romanvm/plugin.video.example
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·33 lines (29 loc) · 837 Bytes
/
build.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
#!/bin/bash
set -e
RELEASEFOLDER="./RELEASE/plugin.video.pt"
if [ -d ${RELEASEFOLDER} ]; then rm -r ${RELEASEFOLDER}; fi
mkdir -p ${RELEASEFOLDER}
for filename in ./*; do
copybool=0
while read b; do
if [ ${filename##*/} = ${b} ]; then copybool=1; fi
# echo ${b}
done <./.buildignore
if [ ${copybool} = 0 ]; then
if [[ -f ${filename} ]]; then
cp ${filename} ${RELEASEFOLDER}
elif [[ -d ${filename} ]]; then
cp -r ${filename} ${RELEASEFOLDER}
else
echo "${filename} not valid"
fi
fi
done
cd RELEASE
#tar -czvf plugin.video.pt.zip ./plugin.video.pt/
ZIPFILE=plugin.video.pt.zip
if [[ -f ./${ZIPFILE} ]]; then rm ./${ZIPFILE}; fi
zip -r ${ZIPFILE} ./plugin.video.pt/
if [[ -f ~/Downloads/${ZIPFILE} ]]; then rm ~/Downloads/${ZIPFILE}; fi
cp ./plugin.video.pt.zip ~/Downloads/
echo "done"