forked from tuxpoldo/btsync-deb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-all-debs.sh
More file actions
executable file
·46 lines (39 loc) · 888 Bytes
/
make-all-debs.sh
File metadata and controls
executable file
·46 lines (39 loc) · 888 Bytes
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
set -e
SOURCES="btsync-common btsync-gui btsync-user btsync"
[ -n "$1" ] && SOURCES="$1"
function enter_build() {
pushd $1
trap exit_build INT QUIT TERM EXIT
}
function exit_build() {
trap - INT QUIT TERM EXIT
popd
}
for SRCDIR in ${SOURCES}; do
if [ -d ${SRCDIR} ]; then
enter_build ${SRCDIR}
# make binary targets
if [ "${SRCDIR}" != "btsync-common" ]; then
debuild clean
debuild -uc -us -b
rm -f ../*all.build
rm -f ../*all.changes
else
# for destarch in i386 amd64 armel armhf powerpc kfreebsd-amd64 kfreebsd-i386; do
for destarch in i386 amd64 armel armhf powerpc; do
debuild clean
debuild -uc -us -b -a${destarch}
rm -f ../*${destarch}.build
rm -f ../*${destarch}.changes
done
fi
# cleanup garbage
debuild clean
# return
exit_build
else
echo ERROR: source tree ${SRCDIR} not found >&2
fi
done
set +e