This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
mkrelease.sh
executable file
·73 lines (55 loc) · 3.72 KB
/
mkrelease.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)";
echo "Compiling Kerberos.io for each board"
rm -rf $DIR/kios-*
rm -rf $DIR/dl/kerberosio-*
rm -rf $DIR/output/raspberrypi/build/kerberosio-*
rm -rf $DIR/output/raspberrypi2/build/kerberosio-*
rm -rf $DIR/output/raspberrypi3/build/kerberosio-*
rm -rf $DIR/output/raspberrypi4/build/kerberosio-*
$DIR/build.sh raspberrypi
$DIR/build.sh raspberrypi mkimage
$DIR/build.sh raspberrypi mkrelease
$DIR/build.sh raspberrypi2
$DIR/build.sh raspberrypi2 mkimage
$DIR/build.sh raspberrypi2 mkrelease
$DIR/build.sh raspberrypi3
$DIR/build.sh raspberrypi3 mkimage
$DIR/build.sh raspberrypi3 mkrelease
$DIR/build.sh raspberrypi4
$DIR/build.sh raspberrypi4 mkimage
$DIR/build.sh raspberrypi4 mkrelease
echo "Creating Kerberos.io releases per board"
mkdir -p $DIR/releases
DATE=$(date +%Y%m%d)
echo "Preparing release for Raspberry Pi board"
mkdir -p $DIR/releases/rpi/$DATE
cp $DIR/output/raspberrypi/images/kios-raspberrypi-*.gz $DIR/releases/rpi/$DATE
for file in $DIR/output/raspberrypi/build/kerberosio-machinery*/kerberosio*; do cp -v -- "$file" "$DIR/releases/rpi/$DATE/rpi1-machinery-${file##*/}"; done
cd $DIR/output/raspberrypi/target/var/www/web && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' config/app.php && tar czf $DIR/releases/rpi/$DATE/web.tar.gz .
cp $DIR/output/raspberrypi/target/usr/lib/libx265.so.160 $DIR/releases/rpi/$DATE/rpi1-libx265.so.160
cp $DIR/output/raspberrypi/target/usr/lib/libx264.so.148 $DIR/releases/rpi/$DATE/rpi1-libx264.so.148
echo "Preparing release for Raspberry Pi 2 board"
mkdir -p $DIR/releases/rpi2/$DATE
cp $DIR/output/raspberrypi2/images/kios-raspberrypi2-*.gz $DIR/releases/rpi2/$DATE
for file in $DIR/output/raspberrypi2/build/kerberosio-machinery*/kerberosio*; do cp -v -- "$file" "$DIR/releases/rpi2/$DATE/rpi2-machinery-${file##*/}"; done
cd $DIR/output/raspberrypi2/target/var/www/web && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' config/app.php && tar czf $DIR/releases/rpi2/$DATE/web.tar.gz .
cp $DIR/output/raspberrypi2/target/usr/lib/libx265.so.160 $DIR/releases/rpi2/$DATE/rpi2-libx265.so.160
cp $DIR/output/raspberrypi2/target/usr/lib/libx264.so.148 $DIR/releases/rpi2/$DATE/rpi2-libx264.so.148
echo "Preparing release for Raspberry Pi 3 board"
mkdir -p $DIR/releases/rpi3/$DATE
cp $DIR/output/raspberrypi3/images/kios-raspberrypi3-*.gz $DIR/releases/rpi3/$DATE
for file in $DIR/output/raspberrypi3/build/kerberosio-machinery*/kerberosio*; do cp -v -- "$file" "$DIR/releases/rpi3/$DATE/rpi3-machinery-${file##*/}"; done
cd $DIR/output/raspberrypi3/target/var/www/web && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' config/app.php && tar czf $DIR/releases/rpi3/$DATE/web.tar.gz .
cp $DIR/output/raspberrypi3/target/usr/lib/libx265.so.160 $DIR/releases/rpi3/$DATE/rpi3-libx265.so.160
cp $DIR/output/raspberrypi3/target/usr/lib/libx264.so.148 $DIR/releases/rpi3/$DATE/rpi3-libx264.so.148
echo "Preparing release for Raspberry Pi 4 board"
mkdir -p $DIR/releases/rpi4/$DATE
cp $DIR/output/raspberrypi4/images/kios-raspberrypi4-*.gz $DIR/releases/rpi4/$DATE
for file in $DIR/output/raspberrypi4/build/kerberosio-machinery*/kerberosio*; do cp -v -- "$file" "$DIR/releases/rpi4/$DATE/rpi4-machinery-${file##*/}"; done
cd $DIR/output/raspberrypi4/target/var/www/web && sed -i 's/\/data\/machinery\/config/\/\etc\/opt\/kerberosio\/config/g' config/app.php && tar czf $DIR/releases/rpi4/$DATE/web.tar.gz .
cp $DIR/output/raspberrypi4/target/usr/lib/libx265.so.160 $DIR/releases/rpi4/$DATE/rpi4-libx265.so.160
cp $DIR/output/raspberrypi4/target/usr/lib/libx264.so.148 $DIR/releases/rpi4/$DATE/rpi4-libx264.so.148
#echo "Uploading last release to Github (cedricve/kios)"
#cd $DIR
#python uploadrelease.py