head	1.1;
branch	1.1.1;
access;
symbols
	john2:1.1.1.1.0.8
	lapyu1:1.1.1.1.0.6
	john1:1.1.1.1
	lapyu-work:1.1.1.1.0.4
	john-work:1.1.1.1.0.2
	SIXALPHA:1.1.1.1
	TEXLIVE:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2000.10.03.04.02.38;	author plaice;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.10.03.04.02.38;	author plaice;	state Exp;
branches;
next	;


desc
@@



1.1
log
@Initial revision
@
text
@#!/bin/sh
TMP=${TMP:-/tmp}
# Process command line args
# This script isn't very smart.  It assumes
# the last thing is the file name and ignores
# everything else.

usage() {
  echo No file name specified.
  exit 1
}

# Must have at least one argumen (the DVI filename)
if [ $# -eq 0 ]
then
  usage
fi

# Loop over all arguments except the last one
USERARGS=$@@
ARGS=
PDFFILENAME=
while [ $# -ne 1 ]
do
   ARGS="$ARGS $1"
   if [ "$1" = "-o" ]
   then
      PDFFILENAME=`echo $2 | sed -e's/\.pdf//g'`
      ARGS="$ARGS $2"
      shift
   fi
   shift
done
FILENAME=$1
if [ -z "$PDFFILENAME" ] 
then
  PDFFILENAME=$FILENAME
fi

# Run dvipdfm with the fastest options for the first pass
if dvipdfm $ARGS -e -z0 $FILENAME
then
   if gs -r10 -dNOPAUSE -dBATCH -sDEVICE=png256 -sOutputFile=$TMP/$PDFFILENAME.%d $PDFFILENAME.pdf
   then
#  Run dvipdfm with the users specified options for the last pass
      echo dvipdfm -dt $USERARGS;
      dvipdfm -dt $USERARGS;
   fi   
fi   

@


1.1.1.1
log
@sun2.dante.de download 2/10/2000 of TeXLive (Omega 1.11)
@
text
@@
