Filename-with-spaces problem in mkhtml (was: tetex-doc & backspace in xdvik)
Hallo Thomas,
Frank Küster <frank@debian.org> wrote:
> Prakash Countcham <prakash.countcham@imag.fr> wrote:
>
>> Furthermore, I have some problems while configuring tetex-doc 3.0-8. When
>> there is the file "a b.pdf" in the current working directory, I see the
>> following error:
>>
>> $ dpkg-reconfigure tetex-doc
>> mktexlsr: Updating /root/.texmf-var/ls-R...
>> mktexlsr: Updating /usr/local/share/texmf/ls-R...
>> mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN...
>> mktexlsr: Updating /var/cache/fonts/ls-R...
>> mktexlsr: Updating /var/lib/texmf/ls-R...
>> mktexlsr: Done.
>> [: 95: b.pdf: unexpected operator
>> [: 95: b.pdf: unexpected operator
The reason is a little bug in mkhtml and mkthml.nawk, we call the latter
in our postinst script. The following patch, minus the long "outfile"
hunk, fixes it.
Many thanks to all,
Frank
--- tetex-base-3.0.orig/doc/mkhtml.nawk 2005-10-17 11:43:25.130190764 +0200
+++ tetex-base-3.0/doc/mkhtml.nawk 2005-10-17 11:55:29.684464535 +0200
@@ -1,12 +1,26 @@
-#!/bin/sh
+#!/bin/sh -e
: ${MAKE=make}
+outfile=/var/lib/texmf/helpindex.html
+
+if [ ! "$#" -eq 0 ]; then
+ case $1 in
+ -o|--output-file)
+ outfile="$2"
+ ;;
+ *)
+ echo "Unrecognized option: $1"
+ exit 1
+ esac
+fi
+exec >$outfile
+
echo '<TITLE>The TeX System</TITLE>'
echo '<H1>The TeX System</H1>'
for i in *; do
- if [ $i = help ]; then
+ if [ "$i" = help ]; then
echo "<h2>$i</h2><P>"
echo '<ul>'
for j in help/*; do
@@ -19,7 +33,7 @@
echo '</ul>'
continue
fi
- if [ -d $i ]; then
+ if [ -d "$i" ]; then
echo "<h2>$i</h2><P>"
echo '<ul>'
for j in $i/*.html $i/*.html.gz $i/*.dvi $i/*.ps $i/*.tex $i/*.dvi.gz $i/*.ps.gz $i/*.tex.gz $i/*.pdf; d
o
--
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer
Reply to: