#!/bin/sh
#Clean
echo "Cleaning Old Build"
rm -r build
mkdir build
echo "Building Client"
CLASSPATH=$CLASSPATH:LobbyClient.jar javac -source 1.4 -target 1.4 risk/lobby/client/*.java -d build
echo "Building Server"
CLASSPATH=$CLASSPATH:LobbyServer.jar javac risk/lobby/server/*.java -d build
#Copy Images
echo "Copying Images"
cp risk/ui/FlashGUI/*.jpg build/risk/ui/FlashGUI/*.jpg
cp risk/ui/FlashGUI/*.gif build/risk/ui/FlashGUI/*.gif
cp risk/engine/*.gif build/risk/engine/*.gif
echo "Copying Translations"
cp risk/engine/translation/*.properties build/risk/engine/translation/*.properties
echo "Building Jar"
cd build
jar cvf Risk.jar risk
cp Risk.jar ~
