diff options
Diffstat (limited to 'editor/pnmmargin')
-rwxr-xr-x | editor/pnmmargin | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/pnmmargin b/editor/pnmmargin index 0f57d1d4..9dbe24b7 100755 --- a/editor/pnmmargin +++ b/editor/pnmmargin @@ -11,9 +11,8 @@ # documentation. This software is provided "as is" without express or # implied warranty. -tempdir="${TMPDIR-/tmp}/pnmmargin.$$" -mkdir -m 0700 $tempdir || \ - { echo "Could not create temporary file. Exiting." 1>&2; exit 1;} +tempdir=$(mktemp -d "${TMPDIR:-/tmp}/netpbm.XXXXXXXX") || + ( echo "Could not create temporary file. Exiting." 1>&2; exit 1; ) trap 'rm -rf $tempdir' 0 1 3 15 tmp1=$tempdir/pnmm1 @@ -27,6 +26,9 @@ plainopt="" # Parse args. while true ; do case "$1" in + -version|--version ) + pnmpad --version; exit $?; + ;; -p|-pl|-pla|-plai|-plain ) plainopt="-plain" shift |