#!/bin/sh

DM_SVN_URL_EXP_SYNC=https://subversion.xray.aps.anl.gov/DataManagement/trunk/tools/ExperimentSynchronizer

execute() {
    echo "Executing: $@"
    eval "$@"
}

execute svn co $DM_SVN_URL_EXP_SYNC ExperimentSynchronizer
EXPSYNC_DIR=ExperimentSynchronizer

cd $EXPSYNC_DIR

mkdir bin
execute javac -classpath lib/*:resources/* -d bin/ src/gov/anl/dm/esafsync/*.java src/gov/anl/dm/esafsync/serviceconn/*.java
mkdir target
execute jar cfm target/ExperimentSynchronizer.jar manifest.txt -C bin/ . 

