#!/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

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.1 /usr/local/man/man1/"
cp ./doc/wp2latex.1 /usr/local/man/man1/

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."
