diff options
-rwxr-xr-x | regional-currency/functions.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/regional-currency/functions.sh b/regional-currency/functions.sh index 749d1bd..0663fec 100755 --- a/regional-currency/functions.sh +++ b/regional-currency/functions.sh @@ -26,10 +26,11 @@ function check_user() { # status if distro not supported. function detect_distro() { unset DISTRO + [[ -f /etc/os-release ]] && source /etc/os-release # shellcheck disable=SC2034 - uname -a | grep Ubuntu >/dev/null && DISTRO=ubuntu && return 0 + echo $NAME | grep Ubuntu >/dev/null && DISTRO=ubuntu && return 0 # shellcheck disable=SC2034 - uname -a | grep Debian >/dev/null && DISTRO=debian && return 0 + echo $NAME | grep Debian >/dev/null && DISTRO=debian && return 0 echo "Unsupported distro, should be either ubuntu or debian" >&2 return 1 -}
\ No newline at end of file +} |