Index: filters/application/msword_filter =================================================================== --- filters/application/msword_filter (Revision 1038) +++ filters/application/msword_filter (Arbeitskopie) @@ -1,8 +1,18 @@ #!/bin/sh -umask 077 -cp "$1" /tmp/tempfile.$$ -nice -n19 wvText /tmp/tempfile.$$ "$2" -rm /tmp/tempfile.$$ -# remove temporary included image files left by wvText -rm `pwd "$2"`/tempfile.$$* +tmpdir=${TMPDIR-/tmp} +tmpdir="$tmpdir"/tmpdir.$$ + +(umask 077 && mkdir "$tmpdir") || exit 1 + +tmpfile="$tmpdir"/tmpfile.$$ + +cp "$1" "$tmpfile" + +# Change the working directory to $tmpdir which we can safely deleter later. +# Some (buggy) versions of wvText extract the image files from the word +# document and place them in the current working directory. +cd "$tmpdir" +nice -n19 wvText "$tmpfile" "$2" + +rm -rf "$tmpdir" Index: filters/application/vnd.sun.xml.impress_filter =================================================================== --- filters/application/vnd.sun.xml.impress_filter (Revision 1038) +++ filters/application/vnd.sun.xml.impress_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.oasis.opendocument.presentation_filter =================================================================== --- filters/application/vnd.oasis.opendocument.presentation_filter (Revision 1038) +++ filters/application/vnd.oasis.opendocument.presentation_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/x-gnumeric_filter =================================================================== --- filters/application/x-gnumeric_filter (Revision 1038) +++ filters/application/x-gnumeric_filter (Arbeitskopie) @@ -1,12 +1,10 @@ #!/bin/sh -umask 077 +tmpfile=`mktemp` || exit 1 -st=/tmp/tempfile.$$ +nice -n19 ssindex -i "$1" > "$tmpfile" -nice -n19 ssindex -i "$1" > st - -nice -n19 xsltproc - st > "$2" < "$2" < EOF -rm st - -cat "$2" +rm "$tmpfile" Index: filters/application/vnd.stardivision.writer_filter =================================================================== --- filters/application/vnd.stardivision.writer_filter (Revision 1038) +++ filters/application/vnd.stardivision.writer_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.oasis.opendocument.spreadsheet-template_filter =================================================================== --- filters/application/vnd.oasis.opendocument.spreadsheet-template_filter (Revision 1038) +++ filters/application/vnd.oasis.opendocument.spreadsheet-template_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.sun.xml.impress.template_filter =================================================================== --- filters/application/vnd.sun.xml.impress.template_filter (Revision 1038) +++ filters/application/vnd.sun.xml.impress.template_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.oasis.opendocument.presentation-template_filter =================================================================== --- filters/application/vnd.oasis.opendocument.presentation-template_filter (Revision 1038) +++ filters/application/vnd.oasis.opendocument.presentation-template_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.oasis.opendocument.text_filter =================================================================== --- filters/application/vnd.oasis.opendocument.text_filter (Revision 1038) +++ filters/application/vnd.oasis.opendocument.text_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.sun.xml.draw_filter =================================================================== --- filters/application/vnd.sun.xml.draw_filter (Revision 1038) +++ filters/application/vnd.sun.xml.draw_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.sun.xml.calc_filter =================================================================== --- filters/application/vnd.sun.xml.calc_filter (Revision 1038) +++ filters/application/vnd.sun.xml.calc_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/csv_filter =================================================================== --- filters/application/csv_filter (Revision 1038) +++ filters/application/csv_filter (Arbeitskopie) @@ -1,12 +1,10 @@ #!/bin/sh -umask 077 +tmpfile=`mktemp` || exit 1 -st=/tmp/tempfile.$$ +nice -n19 ssindex -i "$1" > "$tmpfile" -nice -n19 ssindex -i "$1" > st - -nice -n19 xsltproc - st > "$2" < "$2" < EOF -rm st - -cat "$2" +rm "$tmpfile" Index: filters/application/x-abiword_filter =================================================================== --- filters/application/x-abiword_filter (Revision 1038) +++ filters/application/x-abiword_filter (Arbeitskopie) @@ -15,4 +15,3 @@ EOF - Index: filters/application/vnd.ms-excel_filter =================================================================== --- filters/application/vnd.ms-excel_filter (Revision 1038) +++ filters/application/vnd.ms-excel_filter (Arbeitskopie) @@ -1,12 +1,10 @@ #!/bin/sh -umask 077 +tmpfile=`mktemp` || exit 1 -st=/tmp/tempfile.$$ +nice -n19 ssindex -i "$1" > "$tmpfile" -nice -n19 ssindex -i "$1" > st - -nice -n19 xsltproc - st > "$2" < "$2" < EOF -rm st - -cat "$2" +rm "$tmpfile" Index: filters/application/vnd.sun.xml.writer_filter =================================================================== --- filters/application/vnd.sun.xml.writer_filter (Revision 1038) +++ filters/application/vnd.sun.xml.writer_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.sun.xml.calc.template_filter =================================================================== --- filters/application/vnd.sun.xml.calc.template_filter (Revision 1038) +++ filters/application/vnd.sun.xml.calc.template_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/vnd.oasis.opendocument.spreadsheet_filter =================================================================== --- filters/application/vnd.oasis.opendocument.spreadsheet_filter (Revision 1038) +++ filters/application/vnd.oasis.opendocument.spreadsheet_filter (Arbeitskopie) @@ -1,3 +1,3 @@ #!/bin/sh - nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" +nice -n19 unzip -p "$1" content.xml | o3totxt > "$2" Index: filters/application/tab-separated-values_filter =================================================================== --- filters/application/tab-separated-values_filter (Revision 1038) +++ filters/application/tab-separated-values_filter (Arbeitskopie) @@ -1,12 +1,10 @@ #!/bin/sh -umask 077 +tmpfile=`mktemp` || exit 1 -st=/tmp/tempfile.$$ +nice -n19 ssindex -i "$1" > "$tmpfile" -nice -n19 ssindex -i "$1" > st - -nice -n19 xsltproc - st > "$2" < "$2" < EOF -rm st - -cat "$2" +rm "$tmpfile" Index: filters/text/csv_filter =================================================================== --- filters/text/csv_filter (Revision 1038) +++ filters/text/csv_filter (Arbeitskopie) @@ -1,12 +1,10 @@ #!/bin/sh -umask 077 +tmpfile=`mktemp` || exit 1 -st=/tmp/tempfile.$$ +nice -n19 ssindex -i "$1" > "$tmpfile" -nice -n19 ssindex -i "$1" > st - -nice -n19 xsltproc - st > "$2" < "$2" < EOF -rm st - -cat "$2" +rm "$tmpfile" Index: filters/text/xml_filter =================================================================== --- filters/text/xml_filter (Revision 1038) +++ filters/text/xml_filter (Arbeitskopie) @@ -15,4 +15,3 @@ EOF - Index: filters/text/x-comma-separated-values_filter =================================================================== --- filters/text/x-comma-separated-values_filter (Revision 1038) +++ filters/text/x-comma-separated-values_filter (Arbeitskopie) @@ -1,12 +1,10 @@ #!/bin/sh -umask 077 +tmpfile=`mktemp` || exit 1 -st=/tmp/tempfile.$$ +nice -n19 ssindex -i "$1" > "$tmpfile" -nice -n19 ssindex -i "$1" > st - -nice -n19 xsltproc - st > "$2" < "$2" < EOF -rm st - -cat "$2" +rm "$tmpfile" Index: filters/text/spreadsheet_filter =================================================================== --- filters/text/spreadsheet_filter (Revision 1038) +++ filters/text/spreadsheet_filter (Arbeitskopie) @@ -1,12 +1,10 @@ #!/bin/sh -umask 077 +tmpfile=`mktemp` || exit 1 -st=/tmp/tempfile.$$ +nice -n19 ssindex -i "$1" > "$tmpfile" -nice -n19 ssindex -i "$1" > st - -nice -n19 xsltproc - st > "$2" < "$2" < EOF -rm st - -cat "$2" +rm "$tmpfile" Index: filters/text/tab-separated-values_filter =================================================================== --- filters/text/tab-separated-values_filter (Revision 1038) +++ filters/text/tab-separated-values_filter (Arbeitskopie) @@ -1,12 +1,10 @@ #!/bin/sh -umask 077 +tmpfile=`mktemp` || exit 1 -st=/tmp/tempfile.$$ +nice -n19 ssindex -i "$1" > "$tmpfile" -nice -n19 ssindex -i "$1" > st - -nice -n19 xsltproc - st > "$2" < "$2" < EOF -rm st - -cat "$2" +rm "$tmpfile"