[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
quoting in texi2dvi (was: [PATCH] gnulib-tool: do not use $(top_srcdir)
From: |
Ralf Wildenhues |
Subject: |
quoting in texi2dvi (was: [PATCH] gnulib-tool: do not use $(top_srcdir) unquoted; may be tainted) |
Date: |
Wed, 26 Nov 2008 23:27:28 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi Karl,
please consider this patch to fix some test failures in git Automake
when `pwd` contains whitespace.
Thanks,
Ralf
2008-11-26 Ralf Wildenhues <address@hidden>
* util/texi2dvi (move_to_dest): Quote file names consistently.
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.135
diff -u -r1.135 texi2dvi
--- util/texi2dvi 18 Sep 2008 18:46:01 -0000 1.135
+++ util/texi2dvi 26 Nov 2008 13:37:47 -0000
@@ -646,7 +646,7 @@
destdir=$dest
destfile=$dest/$file
else
- destdir="`dirname $dest`"
+ destdir=`dirname "$dest"`
destfile=$dest
fi
# We want to compare the source location and the output location,
@@ -656,12 +656,12 @@
# directory names, canonicalized with pwd. We can't use cmp -s
# since the output file might not actually change from run to run;
# e.g., TeX DVI output is timestamped to only the nearest minute.
- destdir=`cd $destdir && pwd`
- destbase=`basename $destfile`
+ destdir=`cd "$destdir" && pwd`
+ destbase=`basename "$destfile"`
#
- sourcedir=`dirname $file`
- sourcedir=`cd $sourcedir && pwd`
- sourcebase=`basename $file`
+ sourcedir=`dirname "$file"`
+ sourcedir=`cd "$sourcedir" && pwd`
+ sourcebase=`basename "$file"`
#
if test "$sourcedir/$sourcebase" != "$destdir/$destbase"; then
verbose "Moving $file to $destfile"
- quoting in texi2dvi (was: [PATCH] gnulib-tool: do not use $(top_srcdir) unquoted; may be tainted),
Ralf Wildenhues <=