#!/bin/bash # # Syntax: dl2pdf [-h] [dvi2pdf_options] # # Purpose: Transforms the most recently changed .dvi file in the current # directory into a .pdf file using dvi2pdf. # The -h flag shows the help info for this command. # # See also: dvi2pdf, dl2ps # Created: Mar 3, 2000 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: pdf, 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" dvi2pdf "$@" "$dvifile" else echo "No dvi files found." fi