As POSIX as it gets
This commit is contained in:
parent
8e2dcc9511
commit
055739e0f9
4
ghcup.sh
4
ghcup.sh
@ -95,7 +95,7 @@ get_distro_name() {
|
|||||||
# freedesktop.org and systemd
|
# freedesktop.org and systemd
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
printf "$NAME"
|
printf "$NAME"
|
||||||
elif type lsb_release >/dev/null 2>&1; then
|
elif command -V lsb_release >/dev/null 2>&1; then
|
||||||
# linuxbase.org
|
# linuxbase.org
|
||||||
printf "$(lsb_release -si)"
|
printf "$(lsb_release -si)"
|
||||||
elif [ -f /etc/lsb-release ]; then
|
elif [ -f /etc/lsb-release ]; then
|
||||||
@ -116,7 +116,7 @@ get_distro_ver() {
|
|||||||
# freedesktop.org and systemd
|
# freedesktop.org and systemd
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
printf "$VERSION_ID"
|
printf "$VERSION_ID"
|
||||||
elif type lsb_release >/dev/null 2>&1; then
|
elif command -V lsb_release >/dev/null 2>&1; then
|
||||||
# linuxbase.org
|
# linuxbase.org
|
||||||
printf "$(lsb_release -sr)"
|
printf "$(lsb_release -sr)"
|
||||||
elif [ -f /etc/lsb-release ]; then
|
elif [ -f /etc/lsb-release ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user