If ascii file doesn't exist fallback to distro ascii, if the distro ascii doesn't exist fallback to no image mode.

This commit is contained in:
Dylan 2016-02-01 09:25:45 +11:00
parent 21c76cd90e
commit dd04093a3b

13
fetch
View file

@ -1461,6 +1461,11 @@ getascii () {
;;
esac
# If the ascii file doesn't exist
# fallback to showing distro ascii.
[ ! -f "$ascii" ] && \
ascii="distro"
if [ "$ascii" == "distro" ]; then
# Lowercase the distro name
ascii=${ascii_distro,,}
@ -1502,14 +1507,6 @@ getascii () {
*) ascii_color="$(color $ascii_color)" ;;
esac
# If the ascii file doesn't exist
# fallback to text mode.
if [ ! -f "$ascii" ]; then
padding="\033[0C"
image="off"
return
fi
print="${ascii_color}$(<"$ascii")"
fi