get just the OS pretty name for Dan

This commit is contained in:
Jacob Salmela 2017-05-20 02:01:56 -05:00
parent 6fa00e7cc8
commit 5d7ef9281f
No known key found for this signature in database
GPG key ID: 1962FF1A5046135E

View file

@ -90,9 +90,14 @@ get_distro_attributes() {
local distro_attribute local distro_attribute
for distro_attribute in "${distro_info[@]}"; do for distro_attribute in "${distro_info[@]}"; do
# Display the information with the ${INFO} icon # Display the information with the ${INFO} icon (we need just the OS PRETTY_NAME)
# No need to show the support URLs so they are grepped out pretty_name_key=$(echo "${distro_attribute}" | grep "PRETTY_NAME" | cut -d '=' -f1)
echo " ${INFO} ${distro_attribute}" | grep -v "_URL" | tr -d '"' 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 done
# Set the IFS back to what it was # Set the IFS back to what it was
IFS="$OLD_IFS" IFS="$OLD_IFS"