From bc41913bc4933a8cebd06c17973b44999de59e94 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sun, 14 Jun 2015 17:15:16 +0200 Subject: schroot-create: fix parameters checking: first check for reproducible/backports, then parse suite/target --- bin/schroot-create.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3-70-g09d2