Skip to content

Commit

Permalink
* -h|help
Browse files Browse the repository at this point in the history
  • Loading branch information
crpb committed Jan 25, 2024
1 parent 315ac05 commit fd0f5d3
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions fnt
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,23 @@ for a in $check; do
fi
done

if [ -z "$1" ]; then
cat<< 'EOHELP'
Syntax: fnt [ update | list | info ]
case "$1" in
help|-h)
cat << 'EOF'
Syntax: fnt [ update | list | info | help ]
fnt [ install | remove | preview | search ] font
update|-u updates the font package index of debian sid
list|-l lists installed fonts with glyphcount per font
info information about how many fonts can be installed
help|-h this help
install|-i install a font
remove|-r remove a font
preview|-p preview a font
search|-s search for font
EOF
;;

EOHELP
exit 0
fi

case "$1" in
update|-u)
echo Updating...
mkdir -p "${CACHEDIR}"
Expand Down Expand Up @@ -244,11 +243,20 @@ case "$1" in
\ \( | ()~() | )/ /
\__|\ | (-___-) | /|__/
' '--' ==`-'== '--' '
EOF
;;
*)
# zcat /usr/share/doc/fnt/README.md.gz |head -10 |grep -v '`' |/usr/games/lolcat
echo "Nothing..."
lolcat=$(command -v cat)
if command -v lolcat>/dev/null; then lolcat=$(command -v lolcat); fi
$lolcat << 'EOF'
.d888
d88P" 888
888 888
.d88888 888888b. d888888
888 888 "88b 888
888 888 888 888
888 888 888 Y88b.
888 888 888 "Y888
EOF
;;
esac

0 comments on commit fd0f5d3

Please sign in to comment.