aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-01-24 02:03:31 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-01-24 02:03:31 +0000
commit6825be76171f47f0ca57fc66e767b786154a7d43 (patch)
tree6e1c255ea2a3e849be5f47533da0335a24a395d8 /src
parenta5f84e28e203a83267e04f428f0cf5aa48e46619 (diff)
downloadsimplepkg-6825be76171f47f0ca57fc66e767b786154a7d43.tar.gz
simplepkg-6825be76171f47f0ca57fc66e767b786154a7d43.tar.bz2
simplaret_set_arch fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@124 04377dda-e619-0410-9926-eae83683ac58
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