#!/bin/bash # # Syntax: dl2ps [-h] [dvi2ps_options] # # Purpose: Transforms the most recently changed .dvi file in the # current directory into a .ps file using dvi2ps. # The -h flag shows the help info for this command. # # See also: dvi2ps, dl2pdf # Created: Aug 19, 1998 by Bart De Schutter # Last revised: Jan 22, 2002 by Bart De Schutter # # See http://www.deschutter.info/util/scripts.html for the latest version of # this script. # Status: public # Category: postscript, latex if [ $# -ge 1 -a "$1" = "-h" ]; then sed '/^$/q;/^#!/d;s/^# //;s/^#//' $0 >&2 exit 1 fi dvifile=$((ls -t *.dvi | head -1) 2>/dev/null) if [ -n "$dvifile" ]; then echo "Processing $dvifile" dvi2ps "$@" "$dvifile" else echo "No dvi files found." fi