[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texi2dvi: Beware of spaces
From: |
Akim Demaille |
Subject: |
texi2dvi: Beware of spaces |
Date: |
Tue, 28 Feb 2006 17:55:46 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
Be robust to spaces in directory names.
* util/texi2dvi (absolute): Be robust to non directories.
(run_tex): Quote in_input properly.
(compile): Quote args of eval properly.
Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.75
diff -u -u -r1.75 texi2dvi
--- util/texi2dvi 14 Feb 2006 19:51:55 -0000 1.75
+++ util/texi2dvi 28 Feb 2006 16:53:06 -0000
@@ -234,9 +234,12 @@
# Absolute paths don't need to be expanded.
echo "$1"
;;
- *)
- (cd "$orig_pwd/`func_dirname $1`" 2>/dev/null &&
- echo `pwd`/`basename "$1"`)
+ *) local rel="$orig_pwd/`func_dirname $1`"
+ if test -d "$rel"; then
+ (cd "$rel" 2>/dev/null && echo `pwd`/`basename "$1"`);
+ else
+ fatal 1 "not a directory: $rel"
+ fi
;;
esac
}
@@ -645,7 +648,7 @@
# subdirectory to exist.
case $language:$tidy in
latex:true)
- sed -n 's|^[ ]*\\include{\(.*\)/.*}.*|\1|p' $in_input |
+ sed -n 's|^[ ]*\\include{\(.*\)/.*}.*|\1|p' "$in_input" |
sort -u |
while read d
do
@@ -1097,7 +1100,7 @@
# directory (e.g., in clean build mode, or during the macro-
support
# detection).
val=`absolute_filenames "$val"`
- eval $var="$val"
+ eval $var="\"$val\""
eval export $var
eval verbose "$var=\'\$${var}\'"
done
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texi2dvi: Beware of spaces,
Akim Demaille <=