install.sh 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/bash
  2. echo "##################"
  3. echo "Release you want :"
  4. echo "##################"
  5. repertoirdebase=`pwd`
  6. PS3='> ' # le prompt
  7. COMPIL=("3.2.2" "dev" "primavera" "trunk")
  8. select CHOIX in "${COMPIL[@]}" ; do
  9. case $REPLY in
  10. 1)
  11. TAG="ecearth_$CHOIX"
  12. echo ""
  13. ;;
  14. 2)
  15. TAG="ecearth_$CHOIX"
  16. CHOIX="3.2.2"
  17. echo ""
  18. ;;
  19. 3)
  20. TAG="ecearth_$CHOIX"
  21. echo ""
  22. ;;
  23. 4)
  24. TAG="ecearth"
  25. cp $CHOIX/runtime/classic/ctrl/namelist.nemo-ORCA1L75-coupled.cfg.sh $HOME/modeles/ecearth/runtime/classic/ctrl
  26. echo ""
  27. ;;
  28. esac
  29. break
  30. done
  31. TARGET="$HOME/modeles/ecearth/$TAG"
  32. cp $CHOIX/sources/config-build.xml $TARGET/sources/config-build.xml
  33. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  34. machine=`uname --nodename`
  35. case "$machine" in
  36. *lm3*)
  37. echo "Lemaitre3"
  38. cp $CHOIX/sources/nemo_lemaitre3_arch-ecconf.fcm.tmpl $TARGET/sources/nemo-3.6/ARCH/arch-ecconf.fcm.tmpl
  39. cp $CHOIX/sources/runoff-mapper_lemaitre3_Makefile.tmpl $TARGET/sources/runoff-mapper/src/Makefile.tmpl
  40. cp $CHOIX/runtime/classic/platform/lemaitre3.cfg.tmpl $TARGET/runtime/classic/platform/lemaitre3.cfg.tmpl
  41. cat $CHOIX/runtime/classic/lemaitre3.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  42. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  43. ;;
  44. *zenobe*)
  45. echo "Zenobe"
  46. cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl
  47. cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  48. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  49. ;;
  50. *)
  51. echo "Unknown machine"
  52. ;;
  53. esac
  54. echo "Patch applied to ${TARGET}."