Cleanup distro detection
This commit is contained in:
7
neofetch
7
neofetch
@@ -463,14 +463,11 @@ case "$os" in
|
||||
distro="$(crux)"
|
||||
|
||||
else
|
||||
distro="$(grep -h '^NAME=' /etc/*ease)"
|
||||
distro="$(awk -F 'NAME="|"' '/^NAME=/ {printf $2}' /etc/*ease)"
|
||||
|
||||
# Workaround for distros that store the value differently.
|
||||
[ -z "$distro" ] && distro="$(grep -h 'TAILS_PRODUCT_NAME' /etc/*ease)"
|
||||
[ -z "$distro" ] && distro="$(awk -F 'TAILS_PRODUCT_NAME="|"' '/^TAILS_PRODUCT_NAME=/ {printf $2}' /etc/*ease)"
|
||||
[ -z "$distro" ] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease)"
|
||||
|
||||
distro=${distro/*NAME\=}
|
||||
distro=${distro//\"}
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user