|
Lines 1-116
Link Here
|
| 1 |
diff -ru contrib.orig/card.in contrib/card.in |
|
|
| 2 |
--- contrib.orig/card.in Thu Dec 30 19:23:25 2004 |
| 3 |
+++ contrib/card.in Thu Dec 30 19:29:49 2004 |
| 4 |
@@ -38,7 +38,7 @@ |
| 5 |
LC_ALL="${LC_ALL-C}" export LC_ALL |
| 6 |
print_form_feeds=: |
| 7 |
RM="/bin/rm -rf" |
| 8 |
-tmp_dir=${TMPDIR-/tmp}/$program.$$ |
| 9 |
+tmp_dir=$(mktemp -d -t ${program}) || exit 1 |
| 10 |
tmp_file=$tmp_dir/card |
| 11 |
success=false |
| 12 |
verbose=: |
| 13 |
@@ -190,7 +190,6 @@ |
| 14 |
|
| 15 |
# Create a tmp dir and be ready to clean up |
| 16 |
trap "$RM $tmp_dir" 0 1 2 15 |
| 17 |
-(umask 077 && mkdir $tmp_dir) || exit 1 |
| 18 |
|
| 19 |
case $LC_ALL in |
| 20 |
fr) footer="Engendré par $version_short" ;; |
| 21 |
diff -ru contrib.orig/fixps.in contrib/fixps.in |
| 22 |
--- contrib.orig/fixps.in Thu Dec 30 19:23:25 2004 |
| 23 |
+++ contrib/fixps.in Thu Dec 30 19:31:22 2004 |
| 24 |
@@ -38,7 +38,7 @@ |
| 25 |
run_gs=0 |
| 26 |
# What action to perform: fixps, cat, check, and gs |
| 27 |
task=fixps |
| 28 |
-tmpdir=/tmp/$program.$$ |
| 29 |
+tmpdir=$(mktemp -d -t ${program}) || exit 1 |
| 30 |
verbose=echo |
| 31 |
|
| 32 |
# The version/usage strings |
| 33 |
@@ -191,7 +191,6 @@ |
| 34 |
trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15 |
| 35 |
fi |
| 36 |
|
| 37 |
-mkdir $tmpdir |
| 38 |
fixps_sed=$tmpdir/fixps.sed |
| 39 |
|
| 40 |
# If printing from stdin, save into a tmp file |
| 41 |
diff -ru contrib.orig/pdiff.in contrib/pdiff.in |
| 42 |
--- contrib.orig/pdiff.in Thu Dec 30 19:23:25 2004 |
| 43 |
+++ contrib/pdiff.in Thu Dec 30 19:16:59 2004 |
| 44 |
@@ -34,7 +34,7 @@ |
| 45 |
diff_options='-u' |
| 46 |
file= |
| 47 |
output= |
| 48 |
-tmpdir=/tmp/$program.$$ |
| 49 |
+tmpdir=$(mktemp -d -t ${program}) || exit 1 |
| 50 |
verbose=echo |
| 51 |
wdiff_prog=${WDIFF:-wdiff} |
| 52 |
wdiff_options='-w[wd- -x-wd] -y{wd+ -z+wd}' |
| 53 |
diff -ru contrib.orig/psmandup.in contrib/psmandup.in |
| 54 |
--- contrib.orig/psmandup.in Thu Dec 30 19:23:25 2004 |
| 55 |
+++ contrib/psmandup.in Thu Dec 30 19:32:30 2004 |
| 56 |
@@ -36,7 +36,7 @@ |
| 57 |
message= |
| 58 |
psselect=${PSSELECT:-psselect} |
| 59 |
psset=${PSSET:-psset} |
| 60 |
-tmpdir=/tmp/$program.$$ |
| 61 |
+tmpdir=$(mktemp -d -t ${program}) || exit 1 |
| 62 |
|
| 63 |
# These two must be kept in synch. They are opposed. |
| 64 |
verbose=echo |
| 65 |
@@ -184,8 +184,6 @@ |
| 66 |
# Temp dir. Get ready not to leave junk (if not debugging) |
| 67 |
trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15 |
| 68 |
fi |
| 69 |
- |
| 70 |
-mkdir $tmpdir |
| 71 |
|
| 72 |
# If printing from stdin, save into a tmp file |
| 73 |
if test $file = '-'; then |
| 74 |
diff -ru contrib.orig/psset.in contrib/psset.in |
| 75 |
--- contrib.orig/psset.in Thu Dec 30 19:23:25 2004 |
| 76 |
+++ contrib/psset.in Thu Dec 30 19:33:50 2004 |
| 77 |
@@ -33,7 +33,7 @@ |
| 78 |
output=- |
| 79 |
pagedevices= # `;' separated list of `key:value' |
| 80 |
quiet=: # i.e., verbose |
| 81 |
-tmpdir=${TMPDIR:-/tmp}/$program.$$ |
| 82 |
+tmpdir=$(mktemp -d -t ${program}) || exit 1 |
| 83 |
sedscript=$tmpdir/psset.sed |
| 84 |
|
| 85 |
# The version/usage strings |
| 86 |
@@ -185,8 +185,6 @@ |
| 87 |
echo "$help" 1>&2 |
| 88 |
exit 1;; |
| 89 |
esac |
| 90 |
- |
| 91 |
-mkdir $tmpdir |
| 92 |
|
| 93 |
if test -n "$debug"; then |
| 94 |
# Set -x now if debugging |
| 95 |
diff -ru contrib.orig/texi2dvi4a2ps contrib/texi2dvi4a2ps |
| 96 |
--- contrib.orig/texi2dvi4a2ps Thu Dec 30 19:23:25 2004 |
| 97 |
+++ contrib/texi2dvi4a2ps Thu Dec 30 19:34:36 2004 |
| 98 |
@@ -91,7 +91,7 @@ |
| 99 |
quiet= # by default let the tools' message be displayed |
| 100 |
set_language= |
| 101 |
textra= |
| 102 |
-tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems. |
| 103 |
+tmpdir=$(mktemp -d -t ${program}) || exit 1 |
| 104 |
txincludes= # TEXINPUTS extensions |
| 105 |
txiprereq=19990129 # minimum texinfo.tex version to have macro expansion |
| 106 |
verbose=false # echo for verbose mode |
| 107 |
@@ -202,9 +202,6 @@ |
| 108 |
if test -z "$debug"; then |
| 109 |
trap "cd / && rm -rf $tmpdir" 0 1 2 15 |
| 110 |
fi |
| 111 |
- |
| 112 |
-# Create the temporary directory with strict rights |
| 113 |
-(umask 077 && mkdir $tmpdir) || exit 1 |
| 114 |
|
| 115 |
# Prepare the tools we might need. This may be extra work in some |
| 116 |
# cases, but improves the readibility of the script. |