aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 658c66d..91f715f 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -311,7 +311,9 @@ function default_version {
if [ -f "$1/etc/slackware-version" ]; then
cat $1/etc/slackware-version | awk '{ print $2 }' | sed -e 's/.0$//'
else
- echo "none"
+ aaa_base="`basename $(ls $1/var/log/packages/aaa_base-[0-9]* 2> /dev/null)`"
+ pack="`basename $aaa_base | sed -e 's/-[^-]*-[^-]*-[^-]*$//'`"
+ echo $aaa_base | sed -e "s/^$pack-//" | cut -d "-" -f 1 | sed -e 's/.0$//'
fi
}
@@ -324,7 +326,7 @@ function default_arch {
arch="`cat $1/etc/slackware-version | awk '{ print $3 }' | sed -e 's/(//' -e 's/)//'`"
if [ -z "$arch" ]; then
- echo i386
+ echo `uname -m`
else
echo $arch
fi