home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / bin / pdf2dsc < prev    next >
Encoding:
Text File  |  2006-11-28  |  635 b   |  31 lines

  1. #! /bin/sh
  2. # $Id: pdf2dsc 6300 2005-12-28 19:56:24Z giles $
  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.