summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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."