#!/bin/sh

if [ ! -d ../../dmc ]; then
   echo "Deathmatch Classic is not installed (or is not in dmc)"
   exit
fi

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

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

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

echo "Done!"
