2 # figlist by Glenn Chappell <ggc@uiuc.edu>
3 # figlet release 2.1.1 -- 25 Aug 1994
5 # Lists all fonts and control files in figlet's default font directory.
6 # Replaces "figlet -F", which was removed from figlet version 2.1.
8 # Usage: figlist [ -d directory ]
14 FIGLETVERSION
=`$FIGLET -I1 2>/dev/null`
15 if [ -z "$FIGLETVERSION" ]; then
19 USAGE
="Usage: `basename $0` [ -d directory ]"
21 if [ "$1" = "-d" ]; then
35 if [ "$FIGLETVERSION" -lt 20100 ]; then
37 $FIGLET $FONTDIROPT -F
41 # From here on we may assume figlet 2.1 or later
43 FONTDIR
=`$FIGLET $FONTDIROPT -I2`
45 echo "Default font: $FONT"
46 echo "Font directory: $FONTDIR"
48 if [ -d "$FONTDIR" ] && [ -r "$FONTDIR" ]; then
50 if ls *.flf
>/dev
/null
2>&1 ; then
51 echo "Figlet fonts in this directory:"
52 ls *.flf
2>/dev
/null |
sed s
/\.flf$
//
54 echo 'No figlet fonts in this directory'
56 if ls *.flc
>/dev
/null
2>&1 ; then
57 echo "Figlet control files in this directory:"
58 ls *.flc
2>/dev
/null |
sed s
/\.flc$
//
60 echo 'No figlet control files in this directory'
63 echo 'Unable to open directory'