From 3a9c01363a0af7c64179c19f1d6e884c4a7cb873 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 25 Apr 2014 16:46:33 +0200 Subject: use common functions. runs all scripts as copies from /tmp, so the source scripts can be updated while running. --- bin/schroot-create.sh | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'bin/schroot-create.sh') diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh index 76a7f389..d39502e9 100755 --- a/bin/schroot-create.sh +++ b/bin/schroot-create.sh @@ -2,37 +2,22 @@ # Copyright 2012-2014 Holger Levsen # Copyright 2013 Antonio Terceiro +# Copyright 2014 Joachim Breitner # released under the GPLv=2 -# $2 = schroot name -# $1 = base distro -# $2 $3 ... = extra packages to install +. /srv/jenkins/bin/common-functions.sh +common_init "$@" # bootstraps a new chroot for schroot, and then moves it into the right location -set -e -export LC_ALL=C - -# Defaults for the jenkins.debian.net environment -if [ -z "$MIRROR" ]; then - export MIRROR=http://ftp.de.debian.org/debian -fi -if [ -z "$http_proxy" ]; then - # export http_proxy="http://localhost:3128" - : -fi -if [ -z "$CHROOT_BASE" ]; then - export CHROOT_BASE=/chroots -fi -if [ -z "$SCHROOT_BASE" ]; then - export SCHROOT_BASE=/schroots -fi +# $1 = schroot name +# $2 = base distro +# $3 $4 ... = extra packages to install if [ $# -lt 2 ]; then - echo "usage: $0 DISTRO [backports] CMD [ARG1 ARG2 ...]" + echo "usage: $0 TARGET DISTRO [backports] CMD [ARG1 ARG2 ...]" exit 1 fi - TARGET="$1" shift DISTRO="$1" -- cgit v1.2.3-54-g00ecf