forked from teejee2008/selene
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-deb.sh
executable file
·51 lines (34 loc) · 1.07 KB
/
build-deb.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
#!/bin/bash
backup=`pwd`
DIR="$( cd "$( dirname "$0" )" && pwd )"
cd $DIR
. ./BUILD_CONFIG
tgz="../../pbuilder/"
dsc="../../builds/${pkg_name}*.dsc"
libs="../../libs"
sh build-source.sh
cd installer
for arch in i386 amd64
do
echo ""
echo "=========================================================================="
echo " build-deb.sh : $arch"
echo "=========================================================================="
echo ""
rm -rfv ${arch}
mkdir -pv ${arch}
echo "-------------------------------------------------------------------------"
sudo pbuilder --build --buildresult ${arch} --basetgz "${tgz}base-${arch}.tgz" ${dsc}
#check for errors
if [ $? -ne 0 ]; then
cd "$backup"; echo "Failed"; exit 1;
fi
echo "--------------------------------------------------------------------------"
cp -pv --no-preserve=ownership ./${arch}/${pkg_name}*.deb ./${pkg_name}-v${pkg_version}-${arch}.deb
#check for errors
if [ $? -ne 0 ]; then
cd "$backup"; echo "Failed"; exit 1;
fi
echo "--------------------------------------------------------------------------"
done
cd "$backup"