install.sh 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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" "3.2.3")
  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. 5)
  29. TAG="ecearth_$CHOIX"
  30. echo ""
  31. ;;
  32. esac
  33. break
  34. done
  35. TARGET="$HOME/modeles/$TAG"
  36. case "$CHOIX" in
  37. *3.2.3*)
  38. echo "New 3.2.3 release"
  39. cp $CHOIX/sources/config-build.xml $TARGET/sources/config-build.xml
  40. cp $CHOIX/sources/zenobe-intelmpi.xml $TARGET/sources/platform
  41. cp $CHOIX/sources/lemaitre3-intelmpi.xml $TARGET/sources/platform
  42. #
  43. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  44. cp $CHOIX/runtime/classic/zenobe-intelmpi.xml $TARGET/runtime/classic/platform
  45. cp $CHOIX/runtime/classic/lemaitre3-intelmpi.xml $TARGET/runtime/classic/platform
  46. ;;
  47. *)
  48. cp $CHOIX/sources/config-build.xml $TARGET/sources/config-build.xml
  49. #
  50. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  51. ;;
  52. esac
  53. machine=`uname --nodename`
  54. case "$machine" in
  55. *lm3*)
  56. echo "Lemaitre3"
  57. cp $CHOIX/sources/nemo_lemaitre3_arch-ecconf.fcm.tmpl $TARGET/sources/nemo-3.6/ARCH/arch-ecconf.fcm.tmpl
  58. cp $CHOIX/sources/runoff-mapper_lemaitre3_Makefile.tmpl $TARGET/sources/runoff-mapper/src/Makefile.tmpl
  59. cp $CHOIX/runtime/classic/platform/lemaitre3.cfg.tmpl $TARGET/runtime/classic/platform/lemaitre3.cfg.tmpl
  60. cat $CHOIX/runtime/classic/lemaitre3.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  61. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  62. ;;
  63. *zenobe*)
  64. echo "Zenobe"
  65. cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl
  66. cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  67. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  68. ;;
  69. *frontal*)
  70. echo "Zenobe"
  71. cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl
  72. cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  73. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  74. ;;
  75. *)
  76. echo "Unknown machine"
  77. ;;
  78. esac
  79. echo "Patch applied to ${TARGET}."