#!/bin/sh

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

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

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

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

echo "Done!"
