File: psprint

package info (click to toggle)
mpage 2.5.1pre-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 348 kB
  • ctags: 293
  • sloc: ansic: 2,864; makefile: 79; sh: 68
file content (25 lines) | stat: -rw-r--r-- 417 bytes parent folder | download | duplicates (4)
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
#!/bin/sh -

STDIN_TMP_FILE=/tmp/psprint.$$

GS=/usr/local/bin/gs
GSLIB=/usr/local/lib/ghostscript/3.53
#
# define print command (SYSV or BSD ish)
# PRINT="lp -or -s"
PRINT=lpr

if [ $# -eq 0 ]; then
    cat > "${STDIN_TMP_FILE}"
    set "${STDIN_TMP_FILE}"
fi

for i in $* ; do
    ${GS} -sDEVICE=ljet4 -r600 -sOutputFile="|${PRINT}" -q -DNOPAUSE "$i" \
    ${GSLIB}/quit.ps
done

rm -f "${STDIN_TMP_FILE}"

exit 0