diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
commit | cdf6e0151411d887fef61245cb303ef190b29335 (patch) | |
tree | 678c2212e125e66e0a868773e2b4ec460794da4e /converter/other/anytopnm | |
parent | de1311e820dc892f1a3c5c9ae70dbc56868030d8 (diff) | |
download | netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.gz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.xz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.zip |
Promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3641 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 |