1*387f9dfdSAndroid Build Coastguard Worker#!/bin/bash 2*387f9dfdSAndroid Build Coastguard Worker 3*387f9dfdSAndroid Build Coastguard Workerset -x 4*387f9dfdSAndroid Build Coastguard Workerset -e 5*387f9dfdSAndroid Build Coastguard Worker 6*387f9dfdSAndroid Build Coastguard WorkerPARALLEL=${PARALLEL:-1} 7*387f9dfdSAndroid Build Coastguard WorkerTMP=$(mktemp -d /tmp/debuild.XXXXXX) 8*387f9dfdSAndroid Build Coastguard Worker 9*387f9dfdSAndroid Build Coastguard Workerfunction cleanup() { 10*387f9dfdSAndroid Build Coastguard Worker [[ -d $TMP ]] && rm -rf $TMP 11*387f9dfdSAndroid Build Coastguard Worker} 12*387f9dfdSAndroid Build Coastguard Workertrap cleanup EXIT 13*387f9dfdSAndroid Build Coastguard Worker 14*387f9dfdSAndroid Build Coastguard Workermkdir $TMP/bcc 15*387f9dfdSAndroid Build Coastguard Workercp -a * $TMP/bcc 16*387f9dfdSAndroid Build Coastguard Workerpushd $TMP 17*387f9dfdSAndroid Build Coastguard Workertar zcf bcc_@REVISION_LAST@.orig.tar.gz bcc/ 18*387f9dfdSAndroid Build Coastguard Workercd bcc 19*387f9dfdSAndroid Build Coastguard WorkerDEB_BUILD_OPTIONS="nocheck parallel=${PARALLEL}" debuild -us -uc 20*387f9dfdSAndroid Build Coastguard Workerpopd 21*387f9dfdSAndroid Build Coastguard Worker 22*387f9dfdSAndroid Build Coastguard Workercp $TMP/*.deb . 23