# 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
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