-
Notifications
You must be signed in to change notification settings - Fork 4
/
build_all.sh
executable file
·47 lines (38 loc) · 1.08 KB
/
build_all.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
#!/bin/bash -ve
# this script will clone all package repositories and build them
# it will install required dependencies during the run, so it requires sudo access
#
# package dependencies: sudo devscripts git git-buildpackage equivs apt-utils debhelper
#
# also you first need to setup the pbuilder chroot environment:
#
# $ sudo pbuilder create --configfile pbuilderrc
#
#
. settings.sh
if [ ! -d "${KERN_BUILD}" ]; then
mkdir -p ${KERN_BUILD};
fi
pushd ${KERN_BUILD}
for i in ${KERN_PACKAGES}; do
if [ ! -f "$i.build" ]; then
if [ ! -d "$i" ]; then
git clone ${KERN_BASE}$i
fi
pushd $i
dh_clean
git pull
echo RESULTS=${KERN_RESULTS}
echo ROOT=${KERN_ROOT}
BUILDER=pbuilder gbp buildpackage \
--git-pbuilder \
--git-ignore-new \
--git-pbuilder-options="--buildresult ${KERN_RESULTS} \
--configfile ${KERN_ROOT}/pbuilderrc"
popd
touch $i.build
pushd ${KERN_RESULTS}
apt-ftparchive packages . > Packages
popd
fi
done