git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.bash/vars.bash
diff options
context:
space:
mode:
Diffstat (limited to '.bash/vars.bash')
-rw-r--r--.bash/vars.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/.bash/vars.bash b/.bash/vars.bash
index 8b99807..55a59f3 100644
--- a/.bash/vars.bash
+++ b/.bash/vars.bash
@@ -28,6 +28,11 @@ done
# $OSNAME
if [ -r "/etc/os-release" ];then
OSNAME="$(grep ^ID /etc/os-release|awk -F= '{print $NF}'|head -n1|sed 's/"//g')"
+ if grep '^DEBIAN_VERSION_FULL' /etc/os-release >/dev/null 2>&1; then
+ OSVER="$(grep '^DEBIAN_VERSION_FULL' /etc/os-release|awk -F= '{print $NF}'|head -n1|sed 's/"//g')"
+ else
+ OSVER="$(grep '^VERSION_ID' /etc/os-release|awk -F= '{print $NF}'|head -n1|sed 's/"//g')"
+ fi
elif [ "$(uname -s)" == 'SunOS' ]; then OSNAME="sunos"
elif [ -r "/etc/redhat-release" ];then
grep -E "^Red[\ ]?[Hh]at" /etc/redhat-release >/dev/null 2>&1 && OSNAME="redhat"