summaryrefslogtreecommitdiffstats
path: root/bin/rebootstrap.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-01 20:08:52 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-01 20:08:52 +0200
commitecdf85924f1765fc98ae98021a82d9d68482bc27 (patch)
treeef19a4bd73ce870dce61ab398fad84ee05b626ff /bin/rebootstrap.sh
parenta56594028e41fecc4f8513bbed81d32aee29f2fc (diff)
downloadjenkins.debian.net-ecdf85924f1765fc98ae98021a82d9d68482bc27.tar.xz
rebootstrap: add new wrapper, rebootstrap.sh
Diffstat (limited to 'bin/rebootstrap.sh')
-rwxr-xr-xbin/rebootstrap.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/rebootstrap.sh b/bin/rebootstrap.sh
new file mode 100755
index 00000000..1b7ef1ec
--- /dev/null
+++ b/bin/rebootstrap.sh
@@ -0,0 +1,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
+}
+
+CODE=$(mktemp --tmpdir=/tmp gitclone-XXXXXXXXX -u)
+trap cleanup_all INT TERM EXIT
+git clone git://anonscm.debian.org/users/helmutg/rebootstrap.git --depth 1 $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