forked from teejee2008/timeshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-installers.sh
executable file
·56 lines (38 loc) · 1.17 KB
/
build-installers.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
#!/bin/bash
backup=`pwd`
DIR="$( cd "$( dirname "$0" )" && pwd )"
cd $DIR
. ./BUILD_CONFIG
rm -vf installer/*.run
rm -vf installer/*.deb
# build debs
sh build-deb.sh
cd installer
for arch in i386 amd64
do
rm -rfv ${arch}/files
mkdir -pv ${arch}/files
echo ""
echo "=========================================================================="
echo " build-installers.sh : $arch"
echo "=========================================================================="
echo ""
dpkg-deb -x ${arch}/${pkg_name}*.deb ${arch}/files
#check for errors
if [ $? -ne 0 ]; then
cd "$backup"; echo "Failed"; exit 1;
fi
echo "--------------------------------------------------------------------------"
rm -rfv ${arch}/${pkg_name}*.* # remove extra files
cp -pv --no-preserve=ownership ./sanity.config ./${arch}/sanity.config
sanity --generate --base-path ./${arch} --out-path . --arch ${arch}
#check for errors
if [ $? -ne 0 ]; then
cd "$backup"; echo "Failed"; exit 1;
fi
mv -v ./*${arch}.run ./${pkg_name}-v${pkg_version}-${arch}.run
echo "--------------------------------------------------------------------------"
done
cp -vf *.run ../../PACKAGES/
cp -vf *.deb ../../PACKAGES/
cd "$backup"