#!/bin/sh

if [ ! -d ../../valve ]; then
   echo "Half-Life is not installed (or is not in valve)"
   exit
fi

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

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

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

echo "Done!"
