Ticket #36354: docbook-utils-2ndspaces.patch
File docbook-utils-2ndspaces.patch, 8.4 KB (added by lockhart (Thomas Lockhart), 12 years ago) |
---|
-
backends/dvi
old new 6 6 export TEXINPUTS 7 7 8 8 # Convert to TeX 9 $SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS9 $SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE" 10 10 if [ $? -ne 0 ] 11 11 then exit 1 12 12 fi 13 13 14 14 # Convert from TeX to DVI 15 jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp15 jadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp" 16 16 if [ $? -ne 0 ] 17 17 then 18 cat ${SGML_FILE_NAME}.tmp19 rm ${SGML_FILE_NAME}.tmp20 rm ${SGML_FILE_NAME}.tex18 cat "${SGML_FILE_NAME}.tmp" 19 rm "${SGML_FILE_NAME}.tmp" 20 rm "${SGML_FILE_NAME}.tex" 21 21 exit 2 22 22 fi 23 rm ${SGML_FILE_NAME}.tmp23 rm "${SGML_FILE_NAME}.tmp" 24 24 25 25 # If there are unresolved references, re-run jadetex, twice 26 if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log>/dev/null 2>&126 if egrep '^LaTeX Warning: There were undefined references.$' "${SGML_FILE_NAME}.log" >/dev/null 2>&1 27 27 then 28 jadetex ${SGML_FILE_NAME}.tex>/dev/null29 jadetex ${SGML_FILE_NAME}.tex>/dev/null28 jadetex "${SGML_FILE_NAME}.tex" >/dev/null 29 jadetex "${SGML_FILE_NAME}.tex" >/dev/null 30 30 fi 31 rm ${SGML_FILE_NAME}.log32 rm ${SGML_FILE_NAME}.aux33 rm ${SGML_FILE_NAME}.tex34 rm ${SGML_FILE_NAME}.out31 rm "${SGML_FILE_NAME}.log" 32 rm "${SGML_FILE_NAME}.aux" 33 rm "${SGML_FILE_NAME}.tex" 34 rm "${SGML_FILE_NAME}.out" 35 35 36 36 exit 0 -
backends/html
old new 3 3 # This program is under GPL license. See LICENSE file for details. 4 4 5 5 # Convert to HTML 6 $SGML_JADE -t sgml $SGML_ARGUMENTS 6 $SGML_JADE -t sgml $SGML_ARGUMENTS "$SGML_FILE" 7 7 if [ $? -ne 0 ] 8 8 then exit 1 9 9 fi -
backends/pdf
old new 6 6 export TEXINPUTS 7 7 8 8 # Convert to TeX 9 $SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS9 $SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE" 10 10 if [ $? -ne 0 ] 11 11 then exit 1 12 12 fi 13 13 14 14 # Convert from TeX to PDF 15 pdfjadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp15 pdfjadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp" 16 16 if [ $? -ne 0 ] 17 17 then 18 cat ${SGML_FILE_NAME}.tmp19 rm ${SGML_FILE_NAME}.tmp20 rm ${SGML_FILE_NAME}.tex18 cat "${SGML_FILE_NAME}.tmp" 19 rm "${SGML_FILE_NAME}.tmp" 20 rm "${SGML_FILE_NAME}.tex" 21 21 exit 2 22 22 fi 23 rm ${SGML_FILE_NAME}.tmp23 rm "${SGML_FILE_NAME}.tmp" 24 24 25 25 # Unconditionally re-run pdfjadetex, twice 26 pdfjadetex ${SGML_FILE_NAME}.tex>/dev/null27 pdfjadetex ${SGML_FILE_NAME}.tex>/dev/null28 rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux\29 ${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out26 pdfjadetex "${SGML_FILE_NAME}.tex" >/dev/null 27 pdfjadetex "${SGML_FILE_NAME}.tex" >/dev/null 28 rm -f "${SGML_FILE_NAME}.log" "${SGML_FILE_NAME}.aux" \ 29 "${SGML_FILE_NAME}.tex" "${SGML_FILE_NAME}.out" 30 30 31 31 exit 0 -
backends/ps
old new 6 6 export TEXINPUTS 7 7 8 8 # Convert to TeX 9 $SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS9 $SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE" 10 10 if [ $? -ne 0 ] 11 11 then exit 1 12 12 fi 13 13 14 14 # Convert from TeX to DVI 15 jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp15 jadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp" 16 16 if [ $? -ne 0 ] 17 17 then 18 cat ${SGML_FILE_NAME}.tmp19 rm ${SGML_FILE_NAME}.tmp20 rm ${SGML_FILE_NAME}.tex18 cat "${SGML_FILE_NAME}.tmp" 19 rm "${SGML_FILE_NAME}.tmp" 20 rm "${SGML_FILE_NAME}.tex" 21 21 exit 2 22 22 fi 23 rm ${SGML_FILE_NAME}.tmp23 rm "${SGML_FILE_NAME}.tmp" 24 24 25 25 # If there are unresolved references, re-run jadetex, twice 26 if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log>/dev/null 2>&126 if egrep '^LaTeX Warning: There were undefined references.$' "${SGML_FILE_NAME}.log" >/dev/null 2>&1 27 27 then 28 jadetex ${SGML_FILE_NAME}.tex>/dev/null29 jadetex ${SGML_FILE_NAME}.tex>/dev/null28 jadetex "${SGML_FILE_NAME}.tex" >/dev/null 29 jadetex "${SGML_FILE_NAME}.tex" >/dev/null 30 30 fi 31 rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux\32 ${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out31 rm -f "${SGML_FILE_NAME}.log" "${SGML_FILE_NAME}.aux" \ 32 "${SGML_FILE_NAME}.tex" "${SGML_FILE_NAME}.out" 33 33 34 34 # Convert from DVI to PostScript 35 35 PAPERSIZE="-t letter" … … 38 38 PAPERSIZE="-t a4" 39 39 fi 40 40 41 dvips -R -q $PAPERSIZE ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps41 dvips -R -q $PAPERSIZE "${SGML_FILE_NAME}.dvi" -o "${SGML_FILE_NAME}.ps" 42 42 if [ $? -ne 0 ] 43 43 then 44 rm ${SGML_FILE_NAME}.dvi44 rm "${SGML_FILE_NAME}.dvi" 45 45 exit 3 46 46 fi 47 rm ${SGML_FILE_NAME}.dvi47 rm "${SGML_FILE_NAME}.dvi" 48 48 49 49 exit 0 -
backends/rtf
old new 3 3 # This program is under GPL license. See LICENSE file for details. 4 4 5 5 # Convert to RTF 6 $SGML_JADE -t rtf -o ${SGML_FILE_NAME}.rtf $SGML_ARGUMENTS6 $SGML_JADE -t rtf -o "${SGML_FILE_NAME}.rtf" $SGML_ARGUMENTS "$SGML_FILE" 7 7 if [ $? -ne 0 ] 8 8 then exit 1 9 9 fi -
backends/tex
old new 3 3 # This program is under GPL license. See LICENSE file for details. 4 4 5 5 # Convert to TeX 6 $SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS6 $SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE" 7 7 if [ $? -ne 0 ] 8 8 then exit 1 9 9 fi -
backends/txt
old new 23 23 trap 'rm -f "$HTML"; exit' 0 1 2 3 7 13 15 24 24 25 25 # Convert to HTML 26 $SGML_JADE -V nochunks -t sgml ${SGML_ARGUMENTS} >${HTML}26 $SGML_JADE -V nochunks -t sgml ${SGML_ARGUMENTS} "$SGML_FILE" >${HTML} 27 27 if [ $? -ne 0 ] 28 28 then exit 1 29 29 fi -
bin/jw.in
old new then 246 246 echo -e $SGML_HELP_MESSAGE >&2 247 247 exit 1 248 248 fi 249 if [ ! -s $SGML_FRONTEND]249 if [ ! -s "$SGML_FRONTEND" ] 250 250 then 251 251 echo "`basename $0`: There is no frontend called \"$SGML_FRONTEND\"." >&2 252 252 exit 2 … … 270 270 echo -e $SGML_HELP_MESSAGE >&2 271 271 exit 1 272 272 fi 273 if [ ! -s $SGML_FILE]273 if [ ! -s "$SGML_FILE" ] 274 274 then 275 275 echo "`basename $0`: Cannot open \"$SGML_FILE\"." >&2 276 276 exit 3 277 277 fi 278 278 279 279 # Separate the file name and the extension (if any) 280 SGML_FILE_NAME=`basename $SGML_FILE`280 SGML_FILE_NAME=`basename "$SGML_FILE"` 281 281 SGML_FILE_NAME=${SGML_FILE_NAME%.*} 282 282 283 283 # Determine if we are in an XML file … … 416 416 fi 417 417 418 418 # Prepare the parser's arguments 419 SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL $SGML_FILE"419 SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL" 420 420 421 421 # Call the backend 422 422 echo "Using catalogs: `echo $SGML_CATALOG_FILES | sed 's/:/, /g'`" … … 430 430 then 431 431 sh $SGML_BACKEND 432 432 else 433 sh $SGML_BACKEND > $SGML_FILE_NAME.html433 sh $SGML_BACKEND >"$SGML_FILE_NAME.html" 434 434 fi 435 435 SGML_RETURN=$? 436 436 cd "$SGML_CURRENT_DIRECTORY" -
docbook-utils-0.6.
diff -urNp docbook-utils-0.6.14-orig/backends/man.in docbook-utils-0.6.14/backends/man.in
old new HELPER=$SGML_BASE_DIR/docbook/utils-@VER 7 7 TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \ 8 8 { echo >&2 "man backend: could not create secure temporary directory"; exit 1;} 9 9 trap 'rm -rf "${TMPDIR}"' EXIT 10 nsgmls $SGML_FILE> "${TMPDIR}/nsgmls.tmp"10 nsgmls "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp" 11 11 sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs" 12 12 if [ $? -ne 0 ] 13 13 then -
docbook-utils-0.6.
diff -urNp docbook-utils-0.6.14-orig/backends/texi.in docbook-utils-0.6.14/backends/texi.in
old new 3 3 # This program is under GPL license. See LICENSE file for details. 4 4 5 5 # Convert to texinfo 6 nsgmls $SGML_FILE| sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi6 nsgmls "$SGML_FILE" | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi 7 7 if [ $? -ne 0 ] 8 8 then exit 1 9 9 fi