#!/bin/bash echo "##################" echo "Release you want :" echo "##################" repertoirdebase=`pwd` PS3='> ' # le prompt COMPIL=("3.2.2" "dev" "primavera" "trunk") select CHOIX in "${COMPIL[@]}" ; do case $REPLY in 1) TAG="ecearth_$CHOIX" echo "" ;; 2) TAG="ecearth_$CHOIX" CHOIX="3.2.2" echo "" ;; 3) TAG="ecearth_$CHOIX" echo "" ;; 4) TAG="ecearth" cp $CHOIX/runtime/classic/ctrl/namelist.nemo-ORCA1L75-coupled.cfg.sh $HOME/modeles/ecearth/runtime/classic/ctrl echo "" ;; esac break done TARGET="$HOME/modeles/ecearth/$TAG" cp $CHOIX/sources/config-build.xml $TARGET/sources/config-build.xml cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml machine=`uname --nodename` case "$machine" in *lm3*) echo "Lemaitre3" cp $CHOIX/sources/nemo_lemaitre3_arch-ecconf.fcm.tmpl $TARGET/sources/nemo-3.6/ARCH/arch-ecconf.fcm.tmpl cp $CHOIX/sources/runoff-mapper_lemaitre3_Makefile.tmpl $TARGET/sources/runoff-mapper/src/Makefile.tmpl cp $CHOIX/runtime/classic/platform/lemaitre3.cfg.tmpl $TARGET/runtime/classic/platform/lemaitre3.cfg.tmpl cat $CHOIX/runtime/classic/lemaitre3.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl ;; *zenobe*) echo "Zenobe" cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl ;; *) echo "Unknown machine" ;; esac echo "Patch applied to ${TARGET}."