From 01f43b9f93b2d19e4dd1ab34d3126be9bcab224d Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 16 Oct 2015 14:46:31 +0200 Subject: reproducible: refactor --- bin/common-functions.sh | 4 ++++ bin/schroot-create.sh | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'bin') 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." -- cgit v1.2.3-54-g00ecf