diff options
Diffstat (limited to 'editor')
-rwxr-xr-x | editor/pamstretch-gen | 8 | ||||
-rwxr-xr-x | editor/pnmindex.sh | 5 | ||||
-rwxr-xr-x | editor/pnmmargin | 5 | ||||
-rwxr-xr-x | editor/ppmquantall | 5 |
4 files changed, 10 insertions, 13 deletions
diff --git a/editor/pamstretch-gen b/editor/pamstretch-gen index cd59a36b..ba0e8188 100755 --- a/editor/pamstretch-gen +++ b/editor/pamstretch-gen @@ -32,12 +32,12 @@ if [ "$1" = "" ]; then fi tempdir="${TMPDIR-/tmp}/pamstretch-gen.$$" -mkdir $tempdir || { echo "Could not create temporary file. Exiting."; exit 1;} -chmod 700 $tempdir -tempfile=$tempdir/pnmig - +mkdir -m 0700 $tempdir || \ + { echo "Could not create temporary file. Exiting."; exit 1;} trap 'rm -rf $tempdir' 0 1 3 15 +tempfile=$tempdir/pnmig + if ! cat $2 >$tempfile 2>/dev/null; then echo 'pamstretch-gen: error reading file' 1>&2 exit 1 diff --git a/editor/pnmindex.sh b/editor/pnmindex.sh index 15ba1abd..dfc5b82a 100755 --- a/editor/pnmindex.sh +++ b/editor/pnmindex.sh @@ -90,9 +90,8 @@ if [ $# -eq 0 ]; then fi tempdir="${TMPDIR-/tmp}/pnmindex.$$" -mkdir $tempdir || { echo "Could not create temporary file. Exiting."; exit 1;} -chmod 700 $tempdir - +mkdir -m 0700 $tempdir || \ + { echo "Could not create temporary file. Exiting."; exit 1;} trap 'rm -rf $tempdir' 0 1 3 15 tmpfile=$tempdir/pi.tmp diff --git a/editor/pnmmargin b/editor/pnmmargin index 31420f99..d2c9cd72 100755 --- a/editor/pnmmargin +++ b/editor/pnmmargin @@ -12,9 +12,8 @@ # implied warranty. tempdir="${TMPDIR-/tmp}/pnmmargin.$$" -mkdir $tempdir || { echo "Could not create temporary file. Exiting."; exit 1;} -chmod 700 $tempdir - +mkdir -m 0700 $tempdir || \ + { echo "Could not create temporary file. Exiting."; exit 1;} trap 'rm -rf $tempdir' 0 1 3 15 tmp1=$tempdir/pnmm1 diff --git a/editor/ppmquantall b/editor/ppmquantall index af1ce22c..7f3d4849 100755 --- a/editor/ppmquantall +++ b/editor/ppmquantall @@ -71,9 +71,8 @@ for i in ${files[@]}; do done tempdir="${TMPDIR-/tmp}/ppmquantall.$$" -mkdir $tempdir || { echo "Could not create temporary file. Exiting."; exit 1;} -chmod 700 $tempdir - +mkdir -m 0700 $tempdir || \ + { echo "Could not create temporary file. Exiting."; exit 1;} trap 'rm -rf $tempdir' 0 1 3 15 all=$tempdir/pqa.all.$$ |