summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-16 14:46:31 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-16 14:46:31 +0200
commit01f43b9f93b2d19e4dd1ab34d3126be9bcab224d (patch)
treeda68cb55aeeabef3bb2cec55c6b30c9de6a59bda
parent2ea8c692b68c3a3e8ff13c768056ef017922226d (diff)
downloadjenkins.debian.net-01f43b9f93b2d19e4dd1ab34d3126be9bcab224d.tar.xz
reproducible: refactor
-rwxr-xr-xbin/common-functions.sh4
-rwxr-xr-xbin/schroot-create.sh5
2 files changed, 4 insertions, 5 deletions
diff --git a/bin/common-functions.sh b/bin/common-functions.sh
index 8118812f..163833ee 100755
--- a/bin/common-functions.sh
+++ b/bin/common-functions.sh
@@ -74,6 +74,10 @@ else
if [ -z "$SCHROOT_BASE" ]; then
export SCHROOT_BASE=/schroots
fi
+ if [ ! -d "$SCHROOT_BASE" ]; then
+ echo "Directory $SCHROOT_BASE does not exist, aborting."
+ exit 1
+ fi
# use these settings in the scripts in the (s)chroots too
export SCRIPT_HEADER="#!/bin/bash
if $DEBUG ; then
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index befd694b..6f7aa648 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -49,11 +49,6 @@ if [ "$SUITE" = "experimental" ] ; then
EXTRA_SOURCES[1]="deb-src $MIRROR experimental main"
fi
-if [ ! -d "$SCHROOT_BASE" ]; then
- echo "Directory $SCHROOT_BASE does not exist, aborting."
- exit 1
-fi
-
export SCHROOT_TARGET=$(mktemp -d -p $SCHROOT_BASE/ schroot-install-$TARGET-XXXX)
if [ -z "$SCHROOT_TARGET" ]; then
echo "Could not create a directory to create the chroot in, aborting."