From 38ecbdc3e1d7bb4bda83538d3b0dfd00ac55f7e9 Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 16 Oct 2007 22:30:23 +0000 Subject: fixed ticket #19 git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@449 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'trunk/lib/common.sh') 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 -- cgit v1.2.3