diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-04-25 16:46:33 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-04-26 20:11:52 +0200 |
commit | 3a9c01363a0af7c64179c19f1d6e884c4a7cb873 (patch) | |
tree | f144695a6c71458ca1fa1dd429af8921f056ac22 /bin/schroot-create.sh | |
parent | e9d10b50dfa10dc5685d73d387f59772c3ea036d (diff) | |
download | jenkins.debian.net-3a9c01363a0af7c64179c19f1d6e884c4a7cb873.tar.xz |
use common functions. runs all scripts as copies from /tmp, so the source scripts can be updated while running.
Diffstat (limited to 'bin/schroot-create.sh')
-rwxr-xr-x | bin/schroot-create.sh | 29 |
1 files changed, 7 insertions, 22 deletions
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 <holger@layer-acht.org> # Copyright 2013 Antonio Terceiro <terceiro@debian.org> +# Copyright 2014 Joachim Breitner <nomeata@debian.org> # 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" |