File: pstoraster.in

package info (click to toggle)
ghostscript 8.71~dfsg2-9+squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 79,896 kB
  • ctags: 80,654
  • sloc: ansic: 501,432; sh: 25,689; python: 4,853; cpp: 3,633; perl: 3,597; tcl: 1,480; makefile: 1,187; lisp: 407; asm: 284; xml: 263; awk: 66; csh: 17; yacc: 15
file content (62 lines) | stat: -rwxr-xr-x 1,878 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
#
# "$Id: pstoraster.in 9747 2009-05-20 22:33:12Z till $"
#
# CUPS raster filter script for Ghostscript.
#
# Copyright 2001-2005 by Easy Software Products.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#

# Installation directories...
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@

# Set the library/font path...
GS_LIB="${CUPS_FONTPATH:=/usr/share/cups/fonts}"
export GS_LIB

# Options we use with Ghostscript...
gsopts="-dQUIET -dDEBUG -dPARANOIDSAFER -dNOPAUSE -dBATCH"
gsopts="$gsopts -dNOMEDIAATTRS -sDEVICE=cups -sstdout=%stderr"

# See if we have a profile=n,n,n,n,n,n,n,n,n,n,n option...
profile=""
for option in $5; do
    case $option in
        profile=*)
	    profile="<</cupsProfile(`echo $option | awk -F= '{print $2}'`)>>setpagedevice"
	    ;;
    esac
done

# See if we have a filename on the command-line...
if test -z "$6"; then
	ifile="-_"
else
	ifile="$6"
fi

echo INFO: Starting GPL Ghostscript `$bindir/@GS@ --version`... 1>&2
echo DEBUG: Running $bindir/@GS@ $gsopts -sOUTPUTFILE="%stdout" -c "$profile" -f "$ifile" 1>&2

# Now run Ghostscript...
exec $bindir/@GS@ $gsopts -sOUTPUTFILE="%stdout" -c "$profile" -f "$ifile"

#
# End of "$Id: pstoraster.in 9747 2009-05-20 22:33:12Z till $".
#