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:
parent
21c76cd90e
commit
dd04093a3b
1 changed files with 5 additions and 8 deletions
13
fetch
13
fetch
|
@ -1461,6 +1461,11 @@ getascii () {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# If the ascii file doesn't exist
|
||||||
|
# fallback to showing distro ascii.
|
||||||
|
[ ! -f "$ascii" ] && \
|
||||||
|
ascii="distro"
|
||||||
|
|
||||||
if [ "$ascii" == "distro" ]; then
|
if [ "$ascii" == "distro" ]; then
|
||||||
# Lowercase the distro name
|
# Lowercase the distro name
|
||||||
ascii=${ascii_distro,,}
|
ascii=${ascii_distro,,}
|
||||||
|
@ -1502,14 +1507,6 @@ getascii () {
|
||||||
*) ascii_color="$(color $ascii_color)" ;;
|
*) ascii_color="$(color $ascii_color)" ;;
|
||||||
esac
|
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")"
|
print="${ascii_color}$(<"$ascii")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue