Here's a simple shell script I wrote to automate the code refresh. You may find 
it useful if you don't want to type multiple commands.

Thanks,
Raymond

#!/bin/sh
CURRENT_DIR=`pwd`
TUSCANY_BUILD=C:/Tuscany/Build
cd $TUSCANY_BUILD
lines=0
if [ -d java ]
then
 echo Updating the Tuscany code from SVN...
 cd $TUSCANY_BUILD/java
 lines=`svn update|tee ../build.log|wc -l`
else
 echo Checking out the Tuscany code from SVN...
 lines=`svn co http://svn.apache.org/repos/asf/incubator/tuscany/java java|tee 
../build.log|wc -l`
fi
if [ $lines -gt 1 ]
then
 cd $TUSCANY_BUILD/java
 mvn clean >> ../build.log
 mvn install >> ../build.log
# For folks using eclipse
# mvn eclipse:eclipse >> ../build.log
 if [ $? -eq 0 ]
 then
  echo The build is successful.
 else
  echo The build fails.
 fi
else
 echo No updates are found.
fi
cd $CURRENT_DIR

Reply via email to