#!/bin/sh

TEXMF=${TEXMF-`kpsexpand '$TEXMF'`}
thisdir=${PWD-`pwd`}

if [ ! -f $thisdir/latex-doc.tar.gz ]; then
	echo "file latex-doc.tar.gz not found in $thisdir." >&2
	exit
fi

cd `dirname $TEXMF`
if [ ! -d texmf/doc ]; then
	echo "directory texmf/doc not found in `pwd`." >&2
	exit
fi

rm -rf texmf/doc/latex
rm -f texmf/doc/german/lkurz.dvi

tar zxvf $thisdir/latex-doc.tar.gz
