From ce77b525169bcc20d841d728571d47dc69ca6862 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 5 Jan 2007 22:50:07 +0000 Subject: new common functions: default_arch and default_version git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@81 04377dda-e619-0410-9926-eae83683ac58 --- lib/common.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib') diff --git a/lib/common.sh b/lib/common.sh index 5da1ed7..0749dd4 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -266,3 +266,17 @@ function eval_config { } +function default_version { + + # get version from /etc/slackware-version + cat $1/etc/slackware-version | awk '{ print $2 }' | sed -e 's/.0$//' + +} + +function default_arch { + + # get arch from /etc/slackware-version + cat $1/etc/slackware-version | awk '{ print $3 }' | sed -e 's/(//' -e 's/)//' + +} + -- cgit v1.2.3