Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Figlist changed to check for local figlet
Same change made to showfigfonts, figlist can now use the local figlet
executable instead of the system executable.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
  • Loading branch information
cmatsuoka committed Jan 26, 2011
1 parent eeaa125 commit e88224d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 6 additions & 9 deletions figlist
Expand Up @@ -7,14 +7,11 @@
#
# Usage: figlist [ -d directory ]

# Set up PATH so figlet can be found
DIRSAVE=`pwd`
cd `dirname "$0"`
PATH="$PATH":`pwd`
cd "$DIRSAVE"
DIR=`dirname $0`
FIGLET=$DIR/figlet

# Get figlet version
FIGLETVERSION=`figlet -I1 2>/dev/null`
FIGLETVERSION=`$FIGLET -I1 2>/dev/null`
if [ -z "$FIGLETVERSION" ]; then
FIGLETVERSION=20000
fi
Expand All @@ -37,14 +34,14 @@ fi

if [ "$FIGLETVERSION" -lt 20100 ]; then
# figlet 2.0
figlet $FONTDIROPT -F
$FIGLET $FONTDIROPT -F
exit
fi

# From here on we may assume figlet 2.1 or later

FONTDIR=`figlet $FONTDIROPT -I2`
FONT=`figlet -I3`
FONTDIR=`$FIGLET $FONTDIROPT -I2`
FONT=`$FIGLET -I3`
echo "Default font: $FONT"
echo "Font directory: $FONTDIR"

Expand Down
1 change: 0 additions & 1 deletion showfigfonts
Expand Up @@ -10,7 +10,6 @@
#
# Usage: showfigfonts [ -d directory ] [ word ]

# Set up PATH so figlet can be found
DIR=`dirname $0`
FIGLET=$DIR/figlet

Expand Down

0 comments on commit e88224d

Please sign in to comment.