Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63435 - ps2ps does not allow - as filename
Summary: ps2ps does not allow - as filename
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-09 08:44 UTC by Tomas Ebenlendr
Modified: 2005-03-16 04:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Ebenlendr 2004-09-09 08:44:11 UTC
Reproducible: Always
Steps to Reproduce:
bash$ ps2ps - - <input.ps >output.ps

Actual Results:  
Program exited with following message:
Usage: ps2ps ...switches... input.ps output.ps


Expected Results:  
It should generate output.ps (provided that input.ps exists)

Patch to repair this: (adding one `?' to to the shell script)

--- /usr/bin/ps2ps	2003-12-10 18:27:13.000000000 +0100
+++ bin/ps2ps	2004-09-09 17:03:14.000000000 +0200
@@ -1,20 +1,20 @@
 #!/bin/sh
 # $Id: ps2ps,v 1.3 2002/04/23 11:58:36 easysw Exp $
 # "Distill" PostScript.
 
 OPTIONS="-dSAFER"
 while true
 do
 	case "$1" in
-	-*) OPTIONS="$OPTIONS $1" ;;
+	-?*) OPTIONS="$OPTIONS $1" ;;
 	*)  break ;;
 	esac
 	shift
 done
 
 if [ $# -ne 2 ]; then
 	echo "Usage: `basename $0` ...switches... input.ps output.ps" 1>&2
 	exit 1
 fi
 
 exec gs -q -sDEVICE=pswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2005-03-16 04:28:25 UTC
applied.