#!/bin/sh

if [ ! -d ../../frontline ]; then
   echo "Front Line Force is not installed (or is not in frontline)"
   exit
fi

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

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

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

echo "Done!"
