Cvs autoinstall script

Same as nightbuild autoinstall topic,

with difference that this script CO's files from cvs as guest user and builds distribution… modify at your convenience.



@sfera, satisfied now :D?



#!/bin/bash

JMETEMP=~/lib/jme-install-temp
JMEINSTALL=~/lib/jme
RIOTDIR=~/workspace/riot-in-ecity
LOG=$JMETEMP/logfile.log

if [ -d $JMETEMP ];
then
   echo "Erasing old directory..."
   rm -rf $JMETEMP
fi

echo "Making new $JMETEMP"
mkdir $JMETEMP
cd $JMETEMP

echo "Checking out sources..."
cvs -d :pserver:guest@cvs.dev.java.net:/cvs login
cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout -P jme

echo "Compiling sources
cd ./jme
ant dist-all
ant dist-test

if [ -d $JMEINSTALL ];
then
    echo "Erasing old jme libs & sources..."
    rm -rf $JMEINSTALL
fi

mkdir $JMEINSTALL

echo "Copying libs..."
cp -f target/*.jar $JMEINSTALL >> $LOG
echo "Copying dependencies..."
cp -rf lib $JMEINSTALL >> $LOG
echo "Copying sources..."
cp -rf src $JMEINSTALL >> $LOG

# Clean cvs entries
cd $JMEINSTALL
for file in `find ./src -name cvs`
do
        rm -rf $file
done

# Uncomment and modify this part to update libraries to your project
# echo "Copying libs to Riot..."
# cp -vfu $JMEINSTALL/*.jar $RIOTDIR/lib >> $LOG
# cp -vfu $JMEINSTALL/lib/* $RIOTDIR/lib >> $LOG
# rm $RIOTDIR/lib/junit-*.jar
echo "Done."

very :wink: