Magellan Linux

Contents of /trunk/ps2pdf-extended/ps2pdf-extended.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13 - (show annotations) (download) (as text)
Wed Apr 27 23:03:11 2005 UTC (19 years ago) by niro
File MIME type: application/x-sh
File size: 606 byte(s)
initial release

1 #!/bin/bash
2
3 # -i input1,input2,.... -o output.pdf
4
5
6 usage() {
7 echo
8 echo "converts one or more postscript files to pdf"
9 echo
10 echo "Usage:"
11 echo " $(basename $0) input1,input2,... output"
12 echo
13 echo "written by Niels Rogalla <niro@magellan-linux.de>"
14 echo
15
16 exit 1
17 }
18
19 [ $# -ne 2 ] && usage
20
21
22 INPUT_FILES="$1"
23 OUTPUT_FILE="$2"
24 TEMP="/var/tmp/ps2pdf-ext-$$.ps"
25
26 #create a empty temp file
27 :> ${TEMP}
28
29 OLD_IFS="$IFS"
30 IFS=","
31 for i in ${INPUT_FILES}
32 do
33 echo "Processing ${i} ..."
34 cat ${i} >> ${TEMP}
35 done
36
37 echo -n "Creating PDF '${OUTPUT_FILE}' ..."
38 ps2pdf ${TEMP} ${OUTPUT_FILE}
39 echo "done"
40 echo
41

Properties

Name Value
svn:executable *