aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/simplaret16
1 files changed, 11 insertions, 5 deletions
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