#!/bin/bash

#settings
/ccc/work/cont003/gen7451/martin/NEMO/
branches/2015/nemo_v3_6_STABLE

X64_CURIE_trust

cd /ccc/work/cont003/gen7451/martin/NEMO
mkdir -p ${}/NEMOGCM

for elmt in ARCH CONFIG NEMO EXTERNAL/IOIPSL EXTERNAL/fcm TOOLS ; do
    svn co http://forge.ipsl.jussieu.fr/nemo/svn/${}/NEMOGCM/$elmt ${}/NEMOGCM/$elmt
done

cd NEMOGCM/TOOLS
cp -f ../../../trunk/NEMOGCM/ARCH/CNRS/arch-X64_CURIE_trust.fcm ../ARCH
./maketools -m ${} -n REBUILD_NEMO > /dev/null

for elmt in $( ls * ); do
    [ ! $( echo $elmt | grep "COMPILE\|maketools\|REBUILD_NEMO" ) ] && rm -rf $elmt
done
