git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.bash/vars.bash
diff options
context:
space:
mode:
authormail_redacted_for_web 2026-03-11 02:03:45 +0100
committermail_redacted_for_web 2026-03-11 02:03:45 +0100
commitcf4ad66b492dce1c4044591a23e151bdf042b6f9 (patch)
tree7b7a53b5dfa39467dfcecf610a8ada425b71f250 /.bash/vars.bash
parent5d0c5681a7a1eefb2135c9816d4d9c6e02d58ecc (diff)
downloaddotfiles-cf4ad66b492dce1c4044591a23e151bdf042b6f9.tar.bz2
feat: include OS version in prompt
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"