summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-06-14 17:15:16 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-14 18:02:53 +0200
commitbc41913bc4933a8cebd06c17973b44999de59e94 (patch)
tree3e353be445851bae17ecadadda178dc32d99bc75 /bin
parentb60f21fe94aed956919985635d563bb6ec648acf (diff)
downloadjenkins.debian.net-bc41913bc4933a8cebd06c17973b44999de59e94.tar.xz
schroot-create: fix parameters checking: first check for reproducible/backports, then parse suite/target
Diffstat (limited to 'bin')
-rwxr-xr-xbin/schroot-create.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index 8607c182..bd04fbdf 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -21,19 +21,6 @@ if [ $# -lt 2 ]; then
exit 1
fi
-TARGET="$1"
-shift
-SUITE="$1"
-shift
-
-declare -a EXTRA_SOURCES
-if [ "$SUITE" = "experimental" ] ; then
- # experimental cannot be bootstrapped
- SUITE=sid
- EXTRA_SOURCES[0]="deb $MIRROR experimental main"
- EXTRA_SOURCES[1]="deb-src $MIRROR experimental main"
-fi
-
if [ "$1" = "backports" ] ; then
EXTRA_SOURCES[2]="deb $MIRROR ${SUITE}-backports main"
EXTRA_SOURCES[3]="deb-src $MIRROR ${SUITE}-backports main"
@@ -47,6 +34,19 @@ if [ "$1" = "reproducible" ] ; then
shift
fi
+TARGET="$1"
+shift
+SUITE="$1"
+shift
+
+declare -a EXTRA_SOURCES
+if [ "$SUITE" = "experimental" ] ; then
+ # experimental cannot be bootstrapped
+ SUITE=sid
+ EXTRA_SOURCES[0]="deb $MIRROR experimental main"
+ EXTRA_SOURCES[1]="deb-src $MIRROR experimental main"
+fi
+
if [ ! -d "$CHROOT_BASE" ]; then
echo "Directory $CHROOT_BASE does not exist, aborting."
exit 1