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/chroot-run.sh | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'bin/chroot-run.sh') 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 # 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" -- cgit v1.2.3-54-g00ecf