forked from teejee2008/timeshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-source.sh
executable file
·50 lines (33 loc) · 1.19 KB
/
build-source.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
#!/bin/bash
for prog in pbuilder-dist make dpkg-source ; do
if sh -c "which $prog 2> /dev/null"; then true ; else echo "You don\'t have $prog, install it" ; exit ; fi
done
backup=`pwd`
DIR="$( cd "$( dirname "$0" )" && pwd )"
cd "$DIR"
. ./BUILD_CONFIG
echo ""
echo "=========================================================================="
echo " build-source.sh"
echo "=========================================================================="
echo ""
echo "app_name: $app_name"
echo "pkg_name: $pkg_name"
echo "--------------------------------------------------------------------------"
# clean build dir
rm -rfv /tmp/builds
mkdir -pv /tmp/builds
make clean
rm -rfv release/source
mkdir -pv release/source
echo "--------------------------------------------------------------------------"
# build source package
dpkg-source --build ./
mv -vf ../$pkg_name*.dsc release/source/
mv -vf ../$pkg_name*.tar.xz release/source/
if [ $? -ne 0 ]; then cd "$backup"; echo "Failed"; exit 1; fi
echo "--------------------------------------------------------------------------"
# list files
ls -l release/source
echo "-------------------------------------------------------------------------"
cd "$backup"