#! /bin/sh # # $ Id: zxdvi,v 1.3 1998/10/26 16:25:43 roland Exp roland $ # # zxdvi - display gzipped DVI-files. # zghostview - display gzipped PostScript-files. # zgv - display gzipped PostScript-/PDF-files. # zdvi2tty - display gzipped DVI-files. # zxpdf - display gzipped PDF-files. # ########################################################################## # # Copyright (C) 1995-2000 Roland Rosenfeld # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ########################################################################## umask 077 tmpdir=${TMPDIR:-/tmp}/zgeneric.$$ mkdir $tmpdir || exit 1 trap "rm -rf $tmpdir; exit" 0 1 2 3 15 ZPROG=`basename $0` PROG=`echo "$ZPROG" | sed -e 's/^z//'` #if [ PROG = 'xpdf' ] #then # PROG='xpdf -rgb 3' #fi for file do case "$file" in *.Z|*.gz|*.z) TMPFILE=$tmpdir/`basename $file .gz` gzip -dc $file > $TMPFILE ;; *.bz) TMPFILE=$tmpdir/`basename $file .bz` bzip -dc $file > $TMPFILE ;; *.bz2) TMPFILE=$tmpdir/`basename $file .bz2` bzip2 -dc $file > $TMPFILE ;; *.F) TMPFILE=$tmpdir/`basename $file .F` freeze -dc $file > $TMPFILE ;; esac $PROG $TMPFILE rm -f $TMPFILE done