mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-24 04:22:32 +00:00
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)"
|
||||
|
||||
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.
|
||||
[ -z "$distro" ] && distro="$(awk -F 'TAILS_PRODUCT_NAME="|"' '/^TAILS_PRODUCT_NAME=/ {printf $2}' /etc/*ease)"
|
||||
|
||||
Reference in New Issue
Block a user