aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2019-02-03 21:35:11 +0300
committerDominik Ritter <dritter03@googlemail.com>2019-02-03 21:52:29 +0300
commit06151eeba90ce7ce54b4222d3ef359b4edb10edf (patch)
treeb0cb784f6cd33d6eab194bf8594bbd682bf6f926 /functions
parent40e04e053cae8b49b5b82c047660369f962d1975 (diff)
parent0b2990b88578bf758147180161c7909f267a930a (diff)
Merge remote-tracking branch 'ben/master' into HEAD
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/utilities.zsh4
1 files changed, 3 insertions, 1 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index a15bf650..9a72eab8 100755
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -102,7 +102,9 @@ case $(uname) in
;;
Linux)
OS='Linux'
- os_release_id="$(grep -E '^ID=([a-zA-Z]*)' /etc/os-release | cut -d '=' -f 2)"
+ if [ -f /etc/os-release ]; then
+ [[ ${(f)"$((</etc/os-release) 2>/dev/null)"} =~ "ID=([A-Za-z]+)" ]] && os_release_id="${match[1]}"
+ fi
case "$os_release_id" in
*arch*)
OS_ICON=$(print_icon 'LINUX_ARCH_ICON')