#!/bin/sh

if [ ! -d ../../holywars ]; then
   echo "Holy Wars is not installed (or is not in holywars)"
   exit
fi

if [ -f ../../holywars/dlls/HPB_bot_i486.so ]; then
   echo "HPB bot is ALREADY installed.  Run Remove first, then run Install"
   exit
fi

if [ ! -d ../../holywars/maps ]; then
   mkdir ../../holywars/maps
fi

echo "Copying HPB_bot_i486.so into holywars/dlls directory"
cp ../HPB_bot_i486.so ../../holywars/dlls
echo "Copying HPB_bot.cfg into holywars directory"
cp HPB_bot.cfg ../../holywars
echo "Copying HPB_bot_names.txt into holywars directory"
cp ../HPB_bot_names.txt ../../holywars
echo "Copying HPB_bot_chat.txt into holywars directory"
cp ../HPB_bot_chat.txt ../../holywars
echo "Copying liblist.gam and old_liblist.gam into holywars directory"
cp *.gam ../../holywars
echo "Copying waypoint files (*.HPB_wpt) into holywars/maps directory"
cp *.HPB_wpt ../../holywars/maps

echo "Done!"
