#!/bin/bash # # Syntax: epsl2fig [-h] [eps2fig_options] # # Purpose: Transforms the most recently changed or created .eps files into # a .fig file using eps2fig (i.e., pstoedit). # The -h flag shows the help info for this command. # # See also: eps2fig, pstoedit, adjust_fig_lines # Created: Dec 31, 2006 by Bart De Schutter # Last revised: Sep 18, 2011 by Bart De Schutter # # See http://www.deschutter.info/util/scripts.html for the latest version of # this script. # Status: public # Category: xfig if [ $# -ge 1 -a "$1" = "-h" ]; then sed '/^$/q;/^#!/d;s/^# //;s/^#//' $0 >&2 exit 1 fi eps_file=$( (ls -t *.eps | head -1) 2>/dev/null) if [ -n "$eps_file" ]; then eps2fig "$@" $eps_file else echo "No .eps files found." fi