tools/font_convert.sh: avoid a bashism

Austin English austinenglish at gmail.com
Tue Jul 20 14:37:21 CDT 2010


While it's not technically a bashism, since the variable is being
assigned by the script, it makes the LSB App Checker slightly happier.
Also fixes the case where OLDDIR contained spaces.

-- 
-Austin
-------------- next part --------------
diff --git a/tools/font_convert.sh b/tools/font_convert.sh
index 91ca600..989f5a7 100755
--- a/tools/font_convert.sh
+++ b/tools/font_convert.sh
@@ -35,7 +35,7 @@ TARGET=/usr/X11R6/lib/X11/fonts/misc;
 BDFTOPCF=/usr/X11R6/bin/bdftopcf;
 PAT="*.fon";
 Q="";
-OLDPWD=`pwd`;
+OLDDIR="`pwd`";

 usage () {
     echo "usage: "`basename $0`" [-q] [-c charset] [-t fontdir] [-b bdftopcf] [-f fnt2bdf]"
@@ -117,7 +117,7 @@ for i in *.bdf; do
     mv "${i%.???}.pcf.gz" $TARGET 2>/dev/null
     if [ $? -ne 0 ]; then
        $Q echo "Can't install fonts to $TARGET. Try again as the root user.";
-        $Q echo "Cleaning up..."; cd "$OLDPWD"; rm -rf "$TMPDIR"; exit 1;
+        $Q echo "Cleaning up..."; cd "$OLDDIR"; rm -rf "$TMPDIR"; exit 1;
     fi;
     rm "$i";
 done;


More information about the wine-patches mailing list