#!/bin/sh
#Please do not execute this file from here, run 'make install' instead!

#PREFIX=/usr/local/share/texmf
#PREFIX=/usr/share/texmf
#PREFIX=/usr/local/teTeX/share/texmf

TEXHASH=
if test "$TEXHASH" == ""
then
  TEXHASH="echo \"No LaTeX texhash utility present on this system.\""
fi



if test "$OSTYPE" == ""
then
  OSTYPE=`uname`
fi
export OSTYPE
make -C ./sources.cc/ install OSTYPE=$OSTYPE

echo "Installing locale"
cp ./doc/locale/cs/lc_messages/wp2latex.mo /usr/share/locale/cs/LC_MESSAGES/
cp ./doc/locale/de/lc_messages/wp2latex.mo /usr/share/locale/de/LC_MESSAGES/

echo "Installing manual page"
echo "cp ./doc/wp2latex.man /usr/local/man/man1/wp2latex.1"
cp ./doc/wp2latex.man /usr/local/man/man1/wp2latex.1

echo "Attempting to install wp2latex styles into /usr/share/texmf/tex/latex/wp2latex/"
mkdir -p /usr/share/texmf/tex/latex/wp2latex
cp ./styles.tex/*.* /usr/share/texmf/tex/latex/wp2latex/
$TEXHASH

echo "I am a dumb script, please check whether your installation was successful."
