From 6825be76171f47f0ca57fc66e767b786154a7d43 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 24 Jan 2007 02:03:31 +0000 Subject: simplaret_set_arch fixes git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@124 04377dda-e619-0410-9926-eae83683ac58 --- src/simplaret | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/simplaret b/src/simplaret index 4563e23..500e456 100755 --- a/src/simplaret +++ b/src/simplaret @@ -761,7 +761,7 @@ function simplaret_set_arch { # set correct value for ARCH - local found repos_type + local repos_type new_arch # any arch defined in ARCH_i386 that hasn't an entry # on $REPOS_CONF will be mapped to i386 @@ -779,18 +779,24 @@ function simplaret_set_arch { for repos_type in patches root repos noarch; do if [ -z "`simplaret_repository $repos_type`" ]; then # there's no repository definition for that arch - if echo $ARCH_i386 | grep -q " $ARCH "; then - ARCH="i386" - elif echo $ARCH_x86_64 | grep -q " $ARCH "; then - ARCH="x86_64" + if echo "$ARCH_i386" | grep -q " $ARCH "; then + new_arch="i386" + elif echo "$ARCH_x86_64" | grep -q " $ARCH "; then + new_arch="x86_64" else echo "$BASENAME: error: no repository definition for arch $ARCH" echo "$BASENAME: please check your $CONF and $REPOS_CONF config files" exit 1 fi + else + return fi done + echo "$BASENAME: changing arch from $ARCH to $new_arch" + + ARCH="$new_arch" + } if [ -z "$1" ]; then -- cgit v1.2.3