Fix a distro detection bug when '/etc/*ease' doesn't use quotes
This commit is contained in:
3
neofetch
3
neofetch
@@ -464,7 +464,8 @@ case "$os" in
|
|||||||
distro="$(crux)"
|
distro="$(crux)"
|
||||||
|
|
||||||
else
|
else
|
||||||
distro="$(awk -F 'NAME="|"' '/^NAME=/ {printf $2}' /etc/*ease)"
|
distro="$(awk -F 'NAME=' '/^NAME=/ {printf $2}' /etc/*ease)"
|
||||||
|
distro=${distro//\"}
|
||||||
|
|
||||||
# Workaround for distros that store the value differently.
|
# Workaround for distros that store the value differently.
|
||||||
[ -z "$distro" ] && distro="$(awk -F 'TAILS_PRODUCT_NAME="|"' '/^TAILS_PRODUCT_NAME=/ {printf $2}' /etc/*ease)"
|
[ -z "$distro" ] && distro="$(awk -F 'TAILS_PRODUCT_NAME="|"' '/^TAILS_PRODUCT_NAME=/ {printf $2}' /etc/*ease)"
|
||||||
|
|||||||
Reference in New Issue
Block a user