Ticket #36354: docbook-utils-2ndspaces.patch

File docbook-utils-2ndspaces.patch, 8.4 KB (added by lockhart (Thomas Lockhart), 12 years ago)

Patchfile from Fedora 18 RPM.

  • backends/dvi

    old new  
    66export TEXINPUTS
    77
    88# Convert to TeX
    9 $SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
     9$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
    1010if [ $? -ne 0 ]
    1111then exit 1
    1212fi
    1313
    1414# Convert from TeX to DVI
    15 jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
     15jadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
    1616if [ $? -ne 0 ]
    1717then
    18   cat ${SGML_FILE_NAME}.tmp
    19   rm ${SGML_FILE_NAME}.tmp
    20   rm ${SGML_FILE_NAME}.tex
     18  cat "${SGML_FILE_NAME}.tmp"
     19  rm "${SGML_FILE_NAME}.tmp"
     20  rm "${SGML_FILE_NAME}.tex"
    2121  exit 2
    2222fi
    23 rm ${SGML_FILE_NAME}.tmp
     23rm "${SGML_FILE_NAME}.tmp"
    2424
    2525# 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>&1
     26if egrep '^LaTeX Warning: There were undefined references.$' "${SGML_FILE_NAME}.log" >/dev/null 2>&1
    2727then
    28     jadetex ${SGML_FILE_NAME}.tex >/dev/null
    29     jadetex ${SGML_FILE_NAME}.tex >/dev/null
     28    jadetex "${SGML_FILE_NAME}.tex" >/dev/null
     29    jadetex "${SGML_FILE_NAME}.tex" >/dev/null
    3030fi
    31 rm ${SGML_FILE_NAME}.log
    32 rm ${SGML_FILE_NAME}.aux
    33 rm ${SGML_FILE_NAME}.tex
    34 rm ${SGML_FILE_NAME}.out
     31rm "${SGML_FILE_NAME}.log"
     32rm "${SGML_FILE_NAME}.aux"
     33rm "${SGML_FILE_NAME}.tex"
     34rm "${SGML_FILE_NAME}.out"
    3535
    3636exit 0
  • backends/html

    old new  
    33# This program is under GPL license. See LICENSE file for details.
    44
    55# Convert to HTML
    6 $SGML_JADE -t sgml $SGML_ARGUMENTS
     6$SGML_JADE -t sgml $SGML_ARGUMENTS "$SGML_FILE"
    77if [ $? -ne 0 ]
    88then exit 1
    99fi
  • backends/pdf

    old new  
    66export TEXINPUTS
    77
    88# Convert to TeX
    9 $SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
     9$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
    1010if [ $? -ne 0 ]
    1111then exit 1
    1212fi
    1313
    1414# Convert from TeX to PDF
    15 pdfjadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
     15pdfjadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
    1616if [ $? -ne 0 ]
    1717then
    18   cat ${SGML_FILE_NAME}.tmp
    19   rm ${SGML_FILE_NAME}.tmp
    20   rm ${SGML_FILE_NAME}.tex
     18  cat "${SGML_FILE_NAME}.tmp"
     19  rm "${SGML_FILE_NAME}.tmp"
     20  rm "${SGML_FILE_NAME}.tex"
    2121  exit 2
    2222fi
    23 rm ${SGML_FILE_NAME}.tmp
     23rm "${SGML_FILE_NAME}.tmp"
    2424
    2525# Unconditionally re-run pdfjadetex, twice
    26 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
     26pdfjadetex "${SGML_FILE_NAME}.tex" >/dev/null
     27pdfjadetex "${SGML_FILE_NAME}.tex" >/dev/null
     28rm -f "${SGML_FILE_NAME}.log" "${SGML_FILE_NAME}.aux" \
     29      "${SGML_FILE_NAME}.tex" "${SGML_FILE_NAME}.out"
    3030
    3131exit 0
  • backends/ps

    old new  
    66export TEXINPUTS
    77
    88# Convert to TeX
    9 $SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
     9$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
    1010if [ $? -ne 0 ]
    1111then exit 1
    1212fi
    1313
    1414# Convert from TeX to DVI
    15 jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
     15jadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
    1616if [ $? -ne 0 ]
    1717then
    18   cat ${SGML_FILE_NAME}.tmp
    19   rm ${SGML_FILE_NAME}.tmp
    20   rm ${SGML_FILE_NAME}.tex
     18  cat "${SGML_FILE_NAME}.tmp"
     19  rm "${SGML_FILE_NAME}.tmp"
     20  rm "${SGML_FILE_NAME}.tex"
    2121  exit 2
    2222fi
    23 rm ${SGML_FILE_NAME}.tmp
     23rm "${SGML_FILE_NAME}.tmp"
    2424
    2525# 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>&1
     26if egrep '^LaTeX Warning: There were undefined references.$' "${SGML_FILE_NAME}.log" >/dev/null 2>&1
    2727then
    28     jadetex ${SGML_FILE_NAME}.tex >/dev/null
    29     jadetex ${SGML_FILE_NAME}.tex >/dev/null
     28    jadetex "${SGML_FILE_NAME}.tex" >/dev/null
     29    jadetex "${SGML_FILE_NAME}.tex" >/dev/null
    3030fi
    31 rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux \
    32         ${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out
     31rm -f "${SGML_FILE_NAME}.log" "${SGML_FILE_NAME}.aux" \
     32        "${SGML_FILE_NAME}.tex" "${SGML_FILE_NAME}.out"
    3333
    3434# Convert from DVI to PostScript
    3535PAPERSIZE="-t letter"
     
    3838  PAPERSIZE="-t a4"
    3939fi
    4040
    41 dvips -R -q $PAPERSIZE ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
     41dvips -R -q $PAPERSIZE "${SGML_FILE_NAME}.dvi" -o "${SGML_FILE_NAME}.ps"
    4242if [ $? -ne 0 ]
    4343then
    44   rm ${SGML_FILE_NAME}.dvi
     44  rm "${SGML_FILE_NAME}.dvi"
    4545  exit 3
    4646fi
    47 rm ${SGML_FILE_NAME}.dvi
     47rm "${SGML_FILE_NAME}.dvi"
    4848
    4949exit 0
  • backends/rtf

    old new  
    33# This program is under GPL license. See LICENSE file for details.
    44
    55# Convert to RTF
    6 $SGML_JADE -t rtf -o ${SGML_FILE_NAME}.rtf $SGML_ARGUMENTS
     6$SGML_JADE -t rtf -o "${SGML_FILE_NAME}.rtf" $SGML_ARGUMENTS "$SGML_FILE"
    77if [ $? -ne 0 ]
    88then exit 1
    99fi
  • backends/tex

    old new  
    33# This program is under GPL license. See LICENSE file for details.
    44
    55# Convert to TeX
    6 $SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
     6$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
    77if [ $? -ne 0 ]
    88then exit 1
    99fi
  • backends/txt

    old new  
    2323trap 'rm -f "$HTML"; exit' 0 1 2 3 7 13 15
    2424
    2525# 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}
    2727if [ $? -ne 0 ]
    2828then exit 1
    2929fi
  • bin/jw.in

    old new then 
    246246  echo -e $SGML_HELP_MESSAGE >&2
    247247  exit 1
    248248fi
    249 if [ ! -s $SGML_FRONTEND ]
     249if [ ! -s "$SGML_FRONTEND" ]
    250250then
    251251  echo "`basename $0`: There is no frontend called \"$SGML_FRONTEND\"." >&2
    252252  exit 2
     
    270270  echo -e $SGML_HELP_MESSAGE >&2
    271271  exit 1
    272272fi
    273 if [ ! -s $SGML_FILE ]
     273if [ ! -s "$SGML_FILE" ]
    274274then
    275275  echo "`basename $0`: Cannot open \"$SGML_FILE\"." >&2
    276276  exit 3
    277277fi
    278278
    279279# Separate the file name and the extension (if any)
    280 SGML_FILE_NAME=`basename $SGML_FILE`
     280SGML_FILE_NAME=`basename "$SGML_FILE"`
    281281SGML_FILE_NAME=${SGML_FILE_NAME%.*}
    282282
    283283# Determine if we are in an XML file
     
    416416fi
    417417
    418418# Prepare the parser's arguments
    419 SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL $SGML_FILE"
     419SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL"
    420420
    421421# Call the backend
    422422echo "Using catalogs: `echo $SGML_CATALOG_FILES | sed 's/:/, /g'`"
     
    430430then
    431431        sh $SGML_BACKEND
    432432else
    433         sh $SGML_BACKEND >$SGML_FILE_NAME.html
     433        sh $SGML_BACKEND >"$SGML_FILE_NAME.html"
    434434fi
    435435SGML_RETURN=$?
    436436cd "$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 
    77TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
    88 { echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
    99trap 'rm -rf "${TMPDIR}"' EXIT
    10 nsgmls $SGML_FILE > "${TMPDIR}/nsgmls.tmp"
     10nsgmls "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp"
    1111sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
    1212if [ $? -ne 0 ]
    1313then
  • 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  
    33# This program is under GPL license. See LICENSE file for details.
    44
    55# Convert to texinfo
    6 nsgmls $SGML_FILE | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
     6nsgmls "$SGML_FILE" | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
    77if [ $? -ne 0 ]
    88then exit 1
    99fi