Fix colors with custom ascii art
This commit is contained in:
parent
a8574c875c
commit
015a0533bb
1 changed files with 5 additions and 7 deletions
12
fetch
12
fetch
|
@ -1470,7 +1470,6 @@ getascii () {
|
||||||
*"Mint"*)
|
*"Mint"*)
|
||||||
c1=$(color 7)
|
c1=$(color 7)
|
||||||
c2=$(color 2)
|
c2=$(color 2)
|
||||||
|
|
||||||
ascii_distro="mint"
|
ascii_distro="mint"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -1518,8 +1517,7 @@ getascii () {
|
||||||
|
|
||||||
# If the ascii file doesn't exist
|
# If the ascii file doesn't exist
|
||||||
# fallback to showing distro ascii.
|
# fallback to showing distro ascii.
|
||||||
[ ! -f "$ascii" ] && \
|
[ ! -f "$ascii" ] && ascii="distro"
|
||||||
ascii="distro"
|
|
||||||
|
|
||||||
if [ "$ascii" == "distro" ]; then
|
if [ "$ascii" == "distro" ]; then
|
||||||
# Lowercase the distro name
|
# Lowercase the distro name
|
||||||
|
@ -1543,7 +1541,7 @@ getascii () {
|
||||||
ascii="$script_dir/ascii/distro/${ascii/ *}"
|
ascii="$script_dir/ascii/distro/${ascii/ *}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Overwrite distro colors if '$ascii_color` doesn't
|
# Overwrite distro colors if '$ascii_colors' doesn't
|
||||||
# equal 'distro'.
|
# equal 'distro'.
|
||||||
if [ "$ascii_colors" != "distro" ]; then
|
if [ "$ascii_colors" != "distro" ]; then
|
||||||
c1=$(color ${ascii_colors[0]})
|
c1=$(color ${ascii_colors[0]})
|
||||||
|
@ -1557,12 +1555,12 @@ getascii () {
|
||||||
# We only use eval in the distro ascii files.
|
# We only use eval in the distro ascii files.
|
||||||
print="$(eval printf "$(<"$ascii")")"
|
print="$(eval printf "$(<"$ascii")")"
|
||||||
else
|
else
|
||||||
case "$ascii_color" in
|
case "${ascii_colors[0]}" in
|
||||||
"distro") ascii_color="$c1" ;;
|
"distro") ascii_color="$c1" ;;
|
||||||
*) ascii_color="$(color $ascii_color)" ;;
|
*) ascii_color="$(color ${ascii_colors[0]})" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
print="$(color ${ascii_colors[0]})$(<"$ascii")"
|
print="${ascii_color}$(<"$ascii")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Turn the file into a variable.
|
# Turn the file into a variable.
|
||||||
|
|
Loading…
Reference in a new issue