forked from teejee2008/polo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-source.sh
executable file
·46 lines (30 loc) · 1.03 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
#!/bin/bash
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"