-
Notifications
You must be signed in to change notification settings - Fork 3
/
packageLibs.sh
executable file
·36 lines (32 loc) · 1.01 KB
/
packageLibs.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
homeLocation=`pwd`
bitmovinCollectorLocation="${homeLocation}/bitmovinPlayerCollector/"
collectorCoreLocation="${homeLocation}/collectorCore/"
lftpPass='' # TODO: insert password here
# param 1: root directory of the library which should be packaged
# param 2: name of the resulting zip file
packageLibrary () {
libLocation=$1
libName=$2
cd $libLocation
zip -r $libName ./
mv "${libName}.zip" ${homeLocation}
cd $homeLocation
}
# param 2: name of the zip file to upload
uploadLibrary () {
libName=$1
lftp -u bitmovin-playerguys,${lftpPass} sftp://bitmovin.sftp.wpengine.com:2222 <<END_SCRIPT
set sftp:auto-confirm yes
cd /files/player
put ${libName}.zip
quit
END_SCRIPT
}
# param 1: root directory of the library which should be packaged
# param 2: name of the resulting zip file
packageAndUploadLibrary () {
packageLibrary $1 $2
uploadLibrary $2
}
packageAndUploadLibrary "$bitmovinCollectorLocation" "bitmovinPlayerCollector"
packageAndUploadLibrary "$collectorCoreLocation" "collectorCore"