Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / externals / figlet / figlist
blob6dea3b2cf8b6615917cb0e6a7889851b2a2821ef
1 #!/bin/sh -
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 ]
10 DIR=`dirname $0`
11 FIGLET=$DIR/figlet
13 # Get figlet version
14 FIGLETVERSION=`$FIGLET -I1 2>/dev/null`
15 if [ -z "$FIGLETVERSION" ]; then
16 FIGLETVERSION=20000
19 USAGE="Usage: `basename $0` [ -d directory ]"
21 if [ "$1" = "-d" ]; then
22 FONTDIROPT="-d $2"
23 if [ $# -ne 2 ]; then
24 echo "$USAGE"
25 exit 1
27 else
28 FONTDIROPT=""
29 if [ $# -ne 0 ]; then
30 echo "$USAGE"
31 exit 1
35 if [ "$FIGLETVERSION" -lt 20100 ]; then
36 # figlet 2.0
37 $FIGLET $FONTDIROPT -F
38 exit
41 # From here on we may assume figlet 2.1 or later
43 FONTDIR=`$FIGLET $FONTDIROPT -I2`
44 FONT=`$FIGLET -I3`
45 echo "Default font: $FONT"
46 echo "Font directory: $FONTDIR"
48 if [ -d "$FONTDIR" ] && [ -r "$FONTDIR" ]; then
49 cd "$FONTDIR"
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$//
53 else
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$//
59 else
60 echo 'No figlet control files in this directory'
62 else
63 echo 'Unable to open directory'