From 8a0bc0345002d8a635f7c9baa08c8e4ee85696ae Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 8 Nov 2018 15:58:58 +0000 Subject: [PATCH] backupiso: Fix order of variables Some values in variables were corrected but used before. Reported-by: Matthias Fischer Signed-off-by: Michael Tremer --- src/scripts/backupiso | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/scripts/backupiso b/src/scripts/backupiso index 2b91b5f6a5..5d85d6e79c 100644 --- a/src/scripts/backupiso +++ b/src/scripts/backupiso @@ -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 -- 2.39.5