aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-11-27 02:17:13 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-11-27 02:17:13 +0000
commit95a7a0a3c7f9ae3c14012f6a4780448035c9d420 (patch)
tree0bdc7ef1a80258554964ba61700423a5dcb52cfd /trunk/lib
parent0f63f59fe31ab7f0bf31ba622c6b131921bb596d (diff)
downloadsimplepkg-95a7a0a3c7f9ae3c14012f6a4780448035c9d420.tar.gz
simplepkg-95a7a0a3c7f9ae3c14012f6a4780448035c9d420.tar.bz2
minor fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@538 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh39
1 files changed, 23 insertions, 16 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 38afca8..c542e19 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -306,22 +306,6 @@ function eval_config {
# arch and version functions
# -----------------------------------------------
-function default_distro {
-
- # get distro name from /etc/slackware-version
- if [ -f "$1/etc/slamd64-version" ]; then
- echo Slamd64
- elif [ -f "$1/etc/bluewhite64-version" ]; then
- echo Bluewhite64
- elif [ -f "$1/etc/sflack-version" ]; then
- echo Sflack
- elif [ -f "$1/etc/slackware-version" ]; then
- cat $1/etc/slackware-version | awk '{ print $1 }'
- else
- echo Slackware
- fi
-}
-
function default_version {
# get version from /etc/slackware-version
@@ -366,6 +350,29 @@ function default_arch {
}
+function default_distro {
+
+ # get distro name from /etc/slackware-version
+ if [ "`default_arch`" == "x86_64" ]; then
+ if [ -f "$1/etc/slamd64-version" ]; then
+ echo slamd64
+ elif [ -f "$1/etc/bluewhite64-version" ]; then
+ echo bluewhite64
+ elif [ -f "$1/etc/sflack-version" ]; then
+ echo sflack
+ else
+ echo slamd64
+ fi
+ else
+ if [ -f "$1/etc/slackware-version" ]; then
+ cat $1/etc/slackware-version | awk '{ print $1 }'
+ else
+ echo slackware
+ fi
+ fi
+
+}
+
# -----------------------------------------------
# template functions
# -----------------------------------------------