home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 September - Disc 1 / PCNET_CD_2006_09.iso / linux / puppy-barebones-2.01r2.iso / pup_201.sfs / usr / bin / pdf2dsc < prev    next >
Encoding:
Text File  |  2005-07-31  |  639 b   |  31 lines

  1. #! /bin/sh
  2. # $Id: pdf2dsc,v 1.6 2004/08/04 00:55:46 giles Exp $
  3.  
  4. # psf2dsc: generates an index of a PDF file.
  5. #
  6. # Yves Arrouye <arrouye@debian.org>, 1996.
  7. # 2000-05-18 lpd <ghost@aladdin.com> added -dSAFER
  8.  
  9. # This definition is changed on install to match the
  10. # executable name set in the makefile
  11. GS_EXECUTABLE=gs
  12.  
  13. me=`basename $0`
  14.  
  15. usage() {
  16.     >&2 echo usage: $me "pdffile [ dscfile ]"
  17.     exit 1
  18. }
  19.  
  20. if [ $# -gt 2 ]
  21. then
  22.     usage
  23. fi
  24.  
  25. pdffile=$1
  26. dscfile=$2
  27. : ${dscfile:=`echo $pdffile | sed 's,\.[^/.]*,,'`.dsc}
  28.  
  29. exec $GS_EXECUTABLE -q -dNODISPLAY -dSAFER -dDELAYSAFER\
  30.     -sPDFname="$pdffile" -sDSCname="$dscfile" pdf2dsc.ps -c quit
  31.