mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
get just the OS pretty name for Dan
This commit is contained in:
parent
6fa00e7cc8
commit
5d7ef9281f
1 changed files with 8 additions and 3 deletions
|
@ -90,9 +90,14 @@ get_distro_attributes() {
|
|||
|
||||
local distro_attribute
|
||||
for distro_attribute in "${distro_info[@]}"; do
|
||||
# Display the information with the ${INFO} icon
|
||||
# No need to show the support URLs so they are grepped out
|
||||
echo " ${INFO} ${distro_attribute}" | grep -v "_URL" | tr -d '"'
|
||||
# Display the information with the ${INFO} icon (we need just the OS PRETTY_NAME)
|
||||
pretty_name_key=$(echo "${distro_attribute}" | grep "PRETTY_NAME" | cut -d '=' -f1)
|
||||
if [[ "${pretty_name_key}" == "PRETTY_NAME" ]]; then
|
||||
PRETTY_NAME=$(echo "${distro_attribute}" | grep "PRETTY_NAME" | cut -d '=' -f2- | tr -d '"')
|
||||
echo " ${INFO} ${PRETTY_NAME}"
|
||||
else
|
||||
:
|
||||
fi
|
||||
done
|
||||
# Set the IFS back to what it was
|
||||
IFS="$OLD_IFS"
|
||||
|
|
Loading…
Reference in a new issue