BDIR=~/build/strace/build-test-${DATETIME}
mkdir -p ${BDIR}
-cd ${BDIR}
+cd ${BDIR}
cat > ~/build/strace/inside-schroot-test.sh << EOF
#!/bin/sh
+set -e
cd ${BDIR}
-git clone -q http://git.code.sf.net/p/strace/code strace.git
+git clone -q http://git.code.sf.net/p/strace/code strace.git || rm -rf strace.git && git clone -q https://github.com/strace/strace strace.git
echo "BUILD ENVIRONMENT INFORMATION"
echo "============================="
echo "Debian architecture"
# separate log file but using the same chroot for speed
rm -rf ~/build/strace/package-test
set +e
-WGET_OPTS="--ca-certificate=/home/93sam/.CA/ca-certificates.crt"
-wget $WGET_OPTS -O /dev/null $PKG_TEST/MANIFEST
+WGET="wget --ca-certificate=/home/93sam/.CA/ca-certificates.crt"
+$WGET -O /dev/null $PKG_TEST/MANIFEST
if [ $? -eq 0 ]; then
# Time to grab sources
mkdir ~/build/strace/package-test
cd ~/build/strace/package-test
- wget $WGET_OPTS $PKG_TEST/MANIFEST
+ $WGET $PKG_TEST/MANIFEST
for file in $(cat MANIFEST); do
- wget $PKG_TEST/$file
+ $WGET $PKG_TEST/$file
done
DSC=$(ls *.dsc)
cd ~/build/strace/package-test
dpkg-source -x *.dsc
cd strace-*
-debuild
+debuild -i -us -uc -b
EOF
chmod +x ~/build/strace/inside-schroot-test.sh
set -e
rm -rf ~/build/strace/package-test
rm -f ~/build/strace/inside-schroot-test.sh
- cat typescript | \
+ gzip -9 typescript
+ FILE=typescript.gz
+ (echo "START $FILE" ; \
+ base64 < $FILE ; \
+ echo "END $FILE") | \
mailx -s "$DSC package build log: $ARCH on $HOSTNAME " \
steve@einval.com
- rm -f typescript
+ rm -f $FILE
fi