Last change
on this file since 27964 was 27964, checked in by ak19, 11 years ago |
Setting the mac ghostscript and imagemagick binaries to executable in SVN
|
-
Property svn:executable
set to
*
|
File size:
1.0 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | # $Id: dvipdf 8773 2008-05-25 02:17:14Z alexcher $
|
---|
3 | # Convert DVI to PDF.
|
---|
4 | #
|
---|
5 | # Please contact Andrew Ford <[email protected]> with any questions
|
---|
6 | # about this file.
|
---|
7 | #
|
---|
8 | # Based on ps2pdf
|
---|
9 |
|
---|
10 | # This definition is changed on install to match the
|
---|
11 | # executable name set in the makefile
|
---|
12 | GS_EXECUTABLE=gs
|
---|
13 |
|
---|
14 |
|
---|
15 | OPTIONS=""
|
---|
16 | DVIPSOPTIONS=""
|
---|
17 | while true
|
---|
18 | do
|
---|
19 | case "$1" in
|
---|
20 | -R*) DVIPSOPTIONS="$DVIPSOPTIONS $1";;
|
---|
21 | -?*) OPTIONS="$OPTIONS $1" ;;
|
---|
22 | *) break ;;
|
---|
23 | esac
|
---|
24 | shift
|
---|
25 | done
|
---|
26 |
|
---|
27 | if [ $# -lt 1 -o $# -gt 2 ]; then
|
---|
28 | echo "Usage: `basename $0` [options...] input.dvi [output.pdf]" 1>&2
|
---|
29 | exit 1
|
---|
30 | fi
|
---|
31 |
|
---|
32 | infile=$1;
|
---|
33 |
|
---|
34 | if [ $# -eq 1 ]
|
---|
35 | then
|
---|
36 | case "${infile}" in
|
---|
37 | *.dvi) base=`basename "${infile}" .dvi` ;;
|
---|
38 | *) base=`basename "${infile}"` ;;
|
---|
39 | esac
|
---|
40 | outfile="${base}".pdf
|
---|
41 | else
|
---|
42 | outfile=$2
|
---|
43 | fi
|
---|
44 |
|
---|
45 | # We have to include the options twice because -I only takes effect if it
|
---|
46 | # appears before other options.
|
---|
47 | exec dvips $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
|
---|
Note:
See
TracBrowser
for help on using the repository browser.