#!/bin/sh

if [ ! -d ../../cstrike ]; then
   echo "Counter-Strike is not installed (or is not in cstrike)"
   exit
fi

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

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

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

echo "Done!"
