diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-06-26 18:15:09 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-06-26 18:15:09 +0000 |
commit | aab4792db8e0adcaf63cf57a1f5e0b18666dae47 (patch) | |
tree | bbfa9c4e12783d2dfd785c4e10964366550e9a60 /converter/other/anytopnm | |
parent | fe14f983ade44baa0794e4ce58a1a5334e46cf68 (diff) | |
download | netpbm-mirror-aab4792db8e0adcaf63cf57a1f5e0b18666dae47.tar.gz netpbm-mirror-aab4792db8e0adcaf63cf57a1f5e0b18666dae47.tar.xz netpbm-mirror-aab4792db8e0adcaf63cf57a1f5e0b18666dae47.zip |
Promote Development to Advanced as Release 10.75.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2803 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/anytopnm')
-rwxr-xr-x | converter/other/anytopnm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/converter/other/anytopnm b/converter/other/anytopnm index 397faae5..e5de85cc 100755 --- a/converter/other/anytopnm +++ b/converter/other/anytopnm @@ -527,14 +527,18 @@ if [ $# -gt 1 ] ; then "input file name." 1>&2 exit 1 elif [ $# -eq 1 ] ; then - inputFile="$1" + if [ $1 = "--version" -o $1 = "-version" ] ; then + pamtopnm --version ; exit $? + else + inputFile="$1" + fi else - inputFile="-" + inputFile="-" + fi -tempdir="${TMPDIR-/tmp}/anytopnm.$$" -mkdir -m 0700 $tempdir || \ - { echo "Could not create temporary file. Exiting."; exit 1;} +tempdir=$(mktemp -d "${TMPDIR:-/tmp}/anytopnm.XXXXXXXX") || + ( echo "Could not create temporary file. Exiting." 1>&2; exit 1; ) trap 'rm -rf $tempdir' 0 # Take out all spaces |