aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.sh14
1 files changed, 14 insertions, 0 deletions
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/)//'
+
+}
+