summaryrefslogtreecommitdiffstats
path: root/bin/rebootstrap.sh
blob: 49e808deb9f9e4d707bbc228e79b51a6a8732db0 (plain)
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
#!/bin/bash

# Copyright © 2015 Holger Levsen <holger@debian.org>
# released under the GPLv=2

DEBUG=true
. /srv/jenkins/bin/common-functions.sh
common_init "$@"

cleanup_all() {
	rm -r $CODE || true
}

CODE=$(mktemp --tmpdir=/tmp gitclone-XXXXXXXXX -u)
trap cleanup_all INT TERM EXIT
git clone git://anonscm.debian.org/users/helmutg/rebootstrap.git $CODE
cd $CODE
git checkout $1
shift
export LC_ALL=C
echo "$(date -u) - Now running '/srv/jenkins/bin/chroot-run.sh sid minimal ./bootstrap.sh $@'"
/srv/jenkins/bin/chroot-run.sh sid minimal ./bootstrap.sh $@
cd
cleanup_all
trap - INT TERM EXIT