projects
/
rpmbased-dist-chroot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add better support for ix86
[rpmbased-dist-chroot.git]
/
rpmbased-dist-chroot.sh
diff --git
a/rpmbased-dist-chroot.sh
b/rpmbased-dist-chroot.sh
index 5aaf4eaef76cb4e11afda41fbdd6610f7e265bb4..7fd9a197336f2deaa5ae643b5c3797292513ed1d 100755
(executable)
--- a/
rpmbased-dist-chroot.sh
+++ b/
rpmbased-dist-chroot.sh
@@
-31,6
+31,18
@@
ourcachedirectory=$(mktemp -d)
architecture=$(uname -m)
export ARCH=$architecture
architecture=$(uname -m)
export ARCH=$architecture
+case $architecture in
+ i686)
+ architecture="i686,i586,i486,i386"
+ ;;
+ i586)
+ architecture="i586,i486,i386"
+ ;;
+ i486)
+ architecture="i486,i386"
+ ;;
+esac
+
function displayHelp() {
cat <<END
Usage: $0 [options]
function displayHelp() {
cat <<END
Usage: $0 [options]
@@
-43,9
+55,25
@@
END
exit $1
}
exit $1
}
+function startswithmm() {
+ if [ "${1##--*}" == "" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+function containsequals() {
+ if [ "${1//*=*}" == "" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
argcommand=""
for option in $@; do
argcommand=""
for option in $@; do
- if
[[ ! $option =~ ^-- ]]
; then
+ if
( ! startswithmm $option )
; then
if [ "x$argcommand" == "xinstall-root" ]; then
InstallRoot=$option
elif [ "x$argcommand" == "xrpm-archives" ]; then
if [ "x$argcommand" == "xinstall-root" ]; then
InstallRoot=$option
elif [ "x$argcommand" == "xrpm-archives" ]; then
@@
-58,7
+86,7
@@
for option in $@; do
fi
fi
else
fi
fi
else
- if
[[ $option =~ [=] ]]
; then
+ if
( containsequals $option )
; then
argcommand=${option%%=*}
argcommand=${argcommand##--}
option=${option##*=}
argcommand=${option%%=*}
argcommand=${argcommand##--}
option=${option##*=}
@@
-198,7
+226,9
@@
done
read -p "Remove cache directory ($ourcachedirectory)? [Yn]: " cleanup
read -p "Remove cache directory ($ourcachedirectory)? [Yn]: " cleanup
-if [[ $cleanup =~ ^[Nn] ]]; then
+cleanup=${cleanup:0:1}
+
+if [ "$cleanup" == "N" ] || [ "$cleanup" == "n" ] ; then
echo leaving logs in $ourcachedirectory
else
echo removing logs directory
echo leaving logs in $ourcachedirectory
else
echo removing logs directory