]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
backupiso: Fix order of variables
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Nov 2018 15:58:58 +0000 (15:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Nov 2018 15:58:58 +0000 (15:58 +0000)
Some values in variables were corrected but used before.

Reported-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/backupiso

index 2b91b5f6a52178e0801e4d96b3f9543da18893a4..5d85d6e79c1a3d8d3881897efb09cccc15370f2f 100644 (file)
@@ -1,8 +1,26 @@
 #!/bin/sh
-arch=$(uname -m)
+
+# FIXME: edit this lines before release
 IPFVER=2.21
 COREVER=$(cat /opt/pakfire/db/core/mine)
-# FIXME: edit this lines before release
+
+arch=$(uname -m)
+
+case $arch in
+       i?86)
+               arch="i586"
+               echo "Your arch is $arch"
+               ;;
+       x86_64)
+               arch="x86_64"
+               echo "Your arch is $arch"
+               ;;
+       *)
+               echo "Arch is not supported"
+               exit 1
+               ;;
+esac
+
 URL="https://downloads.ipfire.org/releases/ipfire-2.x/$IPFVER-core$COREVER/"
 ISO="ipfire-$IPFVER.$arch-full-core$COREVER.iso"
 
@@ -33,21 +51,6 @@ makeiso() {
        return 0
 }
 
-case $arch in
-       i?86)
-               arch="i586"
-               echo "Your arch is $arch"
-               ;;
-       x86_64)
-               arch="x86_64"
-               echo "Your arch is $arch"
-               ;;
-       *)
-               echo "Arch is not supported"
-               exit 1
-               ;;
-esac
-
 if [ -z $1 ]; then
        echo usage: $0 backup-file
        exit