summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-11-14 15:47:15 +0100
committerHolger Levsen <holger@layer-acht.org>2015-11-14 15:47:15 +0100
commit9e19a972040d7992dd9da2ed1eb33a29619fb76f (patch)
tree64b5bfdb1a33851ec56566fa8306750ee050978f
parent3fbfd869dd0f6993efb66e1dc3ffac38dda7fe5e (diff)
downloadjenkins.debian.net-9e19a972040d7992dd9da2ed1eb33a29619fb76f.tar.xz
refactor
-rwxr-xr-xbin/schroot-create.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index c8a5c792..d777f374 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -21,13 +21,24 @@ if [ $# -lt 2 ]; then
exit 1
fi
+# initialize vars
declare -a EXTRA_SOURCES
+for i in $(seq 0 5) ; do
+ EXTRA_SOURCES[$i]=""
+done
+
if [ "$1" = "backports" ] ; then
EXTRA_SOURCES[2]="deb $MIRROR ${SUITE}-backports main"
EXTRA_SOURCES[3]="deb-src $MIRROR ${SUITE}-backports main"
shift
fi
+if [ "$1" = "torbrowser-launcher" ] ; then
+ EXTRA_SOURCES[4]="deb $MIRROR ${SUITE} contrib"
+ EXTRA_SOURCES[5]="deb-src $MIRROR ${SUITE} contrib"
+ shift
+fi
+
if [ "$1" = "reproducible" ] ; then
EXTRA_SOURCES[4]="deb http://reproducible.alioth.debian.org/debian/ ./"
EXTRA_SOURCES[5]="deb-src http://reproducible.alioth.debian.org/debian/ ./"
@@ -35,12 +46,6 @@ if [ "$1" = "reproducible" ] ; then
shift
fi
-if [ "$1" = "torbrowser-launcher" ] ; then
- EXTRA_SOURCES[4]="deb $MIRROR ${SUITE} contrib"
- EXTRA_SOURCES[5]="deb-src $MIRROR ${SUITE} contrib"
- shift
-fi
-
TARGET="$1"
shift