beamerlines/install.sh

48 lines
976 B
Bash
Executable File

PACKAGENAME="beamerlines"
# get TEXMF installation path:
TEXMFPATH=""
if test "x$(id -u)" != "x0"; then
ISROOT=false
TEXMFPATH="$(kpsewhich -var-value TEXMFHOME)"
else
ISROOT=true
TEXMFPATH="$(kpsewhich -var-value TEXMFDIST)"
fi
if test x"$1" = "x--help"; then
echo
if ! $ISROOT; then
echo "Install the beamer lines themes into your \$TEXMFHOME directory"
echo "(\$TEXMFHOME=$TEXMFPATH)."
echo ""
echo "For a system wide installation run the script with super user privileges".
else
echo "Install the beamer lines themes into the \$TEXMFDIST directory"
echo "(\$TEXMFHOME=$TEXMFPATH)."
fi
echo
exit 0
fi
# add installation directory:
DESTDIR="$TEXMFPATH/tex/latex/$PACKAGENAME"
# make installation directory:
mkdir -p "$DESTDIR"
# copy style files:
echo "copy style files to $DESTDIR ..."
cp *.sty "$DESTDIR"
# rebuild tex hash:
if $ISROOT; then
echo "rebuild tex filename databases ..."
texhash
fi
echo "done!"