aboutsummaryrefslogtreecommitdiffstats
path: root/showfigfonts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xshowfigfonts23
-rw-r--r--showfigfonts.62
2 files changed, 10 insertions, 15 deletions
diff --git a/showfigfonts b/showfigfonts
index 643c60b..90c4d0a 100755
--- a/showfigfonts
+++ b/showfigfonts
@@ -10,14 +10,11 @@
#
# Usage: showfigfonts [ -d directory ] [ word ]
-# 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
@@ -39,22 +36,20 @@ else
fi
if [ "$FIGLETVERSION" -lt 20100 ]; then
# figlet 2.0
- FONTDIR="`figlet -F | sed -e '1d' -e '3,$d' -e 's/Font directory: //'`"
+ FONTDIR="`$FIGLET -F | sed -e '1d' -e '3,$d' -e 's/Font directory: //'`"
else
# figlet 2.1 or later
- FONTDIR="`figlet -I2`"
+ FONTDIR="`$FIGLET -I2`"
fi
fi
-cd "$FONTDIR"
-FONTLIST=`ls *.flf | sed s/\.flf$//`
-cd $DIRSAVE
+FONTLIST=`ls "$FONTDIR"/*.flf | sed 's!.*/\(.*\)\.flf$!\1!'`
for F in $FONTLIST ; do
- echo "$F" :
+ echo "$F :"
if [ -n "$WORD" ]; then
- echo "$WORD" | figlet -d "$FONTDIR" -f "$F"
+ echo "$WORD" | $FIGLET -d "$FONTDIR" -f "$F"
else
- echo "$F" | figlet -d "$FONTDIR" -f "$F"
+ echo "$F" | $FIGLET -d "$FONTDIR" -f "$F"
fi
echo "" ; echo ""
done
diff --git a/showfigfonts.6 b/showfigfonts.6
index 6ac7cd1..a4eee79 100644
--- a/showfigfonts.6
+++ b/showfigfonts.6
@@ -11,7 +11,7 @@
.\"
.\" Manual page by Jonathon Abbott, for the Debian Project
.\" slightly modified by Francesco Tapparo, for the Debian Project
-.TH SHOWFIGFONTS 6 "12 January 2011" "v2.2.3"
+.TH SHOWFIGFONTS 6 "26 January 2011" "v2.2.4"
.SH NAME
showfigfonts \- prints a list of available figlet fonts
ommit/debian/rules?id=2f1210c5c81bec6bfb97214a810f4cfcfa6227a1&follow=1'>Linitan fixesJonathan McCrohan2-3/+2 2012-01-25Split out debug packagesJonathan McCrohan2-1/+6 2011-12-31Fix debian/rulesJonathan McCrohan1-1/+1 2011-12-31Remove shlibsJonathan McCrohan1-2/+0 2011-12-31Remove NMU from changelogJonathan McCrohan1-1/+0 2011-12-31Lintian FixesJonathan McCrohan1-2/+4 2011-12-31Remove Makefile patchJonathan McCrohan1-1/+0 2011-12-31Update MakefilesJonathan McCrohan10-248/+8222 2011-12-31Updated makefilesJonathan McCrohan1-0/+1