aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib/common.sh
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-10-16 22:30:23 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-10-16 22:30:23 +0000
commit38ecbdc3e1d7bb4bda83538d3b0dfd00ac55f7e9 (patch)
tree15fed725176a20c7ab6aeef417a6e5f619ab4b8e /trunk/lib/common.sh
parente074baf1b6e9ad3f36da5e47751604e3f841d904 (diff)
downloadsimplepkg-38ecbdc3e1d7bb4bda83538d3b0dfd00ac55f7e9.tar.gz
simplepkg-38ecbdc3e1d7bb4bda83538d3b0dfd00ac55f7e9.tar.bz2
fixed ticket #19
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@449 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib/common.sh')
-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