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/chroot-run.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/chroot-run.sh')
-rwxr-xr-x | bin/chroot-run.sh | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh index 4d3555bb..05df628b 100755 --- a/bin/chroot-run.sh +++ b/bin/chroot-run.sh @@ -4,23 +4,12 @@ # Copyright 2013 Antonio Terceiro <terceiro@debian.org> # released under the GPLv=2 +. /srv/jenkins/bin/common-functions.sh +common_init "$@" + # $1 = base distro # $2 $3 ... = command to run inside a clean chroot running the distro in $1 -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 [ $# -lt 2 ]; then echo "usage: $0 DISTRO [backports] CMD [ARG1 ARG2 ...]" exit 1 @@ -48,13 +37,6 @@ fi export CURDIR=$(pwd) -export SCRIPT_HEADER="#!/bin/bash -set -x -set -e -export DEBIAN_FRONTEND=noninteractive -export LC_ALL=C -export http_proxy=$http_proxy" - bootstrap() { mkdir -p "$CHROOT_TARGET/etc/dpkg/dpkg.cfg.d" echo force-unsafe-io > "$CHROOT_TARGET/etc/dpkg/dpkg.cfg.d/02dpkg-unsafe-io" |