URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 80 |
Rev 81 |
#!/bin/sh
|
#!/bin/sh
|
# Convert PostScript to PDF.
|
# Convert PostScript to PDF.
|
|
|
OPTIONS=""
|
OPTIONS=""
|
while true
|
while true
|
do
|
do
|
case "$1" in
|
case "$1" in
|
-*) OPTIONS="$OPTIONS $1" ;;
|
-*) OPTIONS="$OPTIONS $1" ;;
|
*) break ;;
|
*) break ;;
|
esac
|
esac
|
shift
|
shift
|
done
|
done
|
|
|
if [ $# -lt 1 -o $# -gt 2 ]; then
|
if [ $# -lt 1 -o $# -gt 2 ]; then
|
echo "Usage: `basename $0` [options...] input.ps [output.pdf]" 1>&2
|
echo "Usage: `basename $0` [options...] input.ps [output.pdf]" 1>&2
|
exit 1
|
exit 1
|
fi
|
fi
|
|
|
infile=$1;
|
infile=$1;
|
|
|
if [ $# -eq 1 ]
|
if [ $# -eq 1 ]
|
then
|
then
|
case "${infile}" in
|
case "${infile}" in
|
*.ps) base=`basename ${infile} .ps` ;;
|
*.ps) base=`basename ${infile} .ps` ;;
|
*) base=`basename ${infile}` ;;
|
*) base=`basename ${infile}` ;;
|
esac
|
esac
|
outfile=${base}.pdf
|
outfile=${base}.pdf
|
else
|
else
|
outfile=$2
|
outfile=$2
|
fi
|
fi
|
|
|
# Doing an initial 'save' helps keep fonts from being flushed between pages.
|
# Doing an initial 'save' helps keep fonts from being flushed between pages.
|
exec gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile $OPTIONS -c save pop -f $infile
|
exec gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile $OPTIONS -c save pop -f $infile
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.