install.sh 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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_$CHOIX"
  25. cp $CHOIX/runtime/classic/ctrl/namelist.nemo-ORCA1L75-coupled.cfg.sh $HOME/modeles/ecearth/ecearth_${CHOIX}/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/ecearth/$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. *primavera*)
  48. echo "Primavera release"
  49. sed -i '$ d' $TARGET/sources/config-build.xml
  50. cat $CHOIX/sources/config-build.xml >> $TARGET/sources/config-build.xml
  51. #
  52. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  53. #
  54. ;;
  55. *)
  56. cp $CHOIX/sources/config-build.xml $TARGET/sources/config-build.xml
  57. #
  58. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  59. ;;
  60. esac
  61. machine=`uname --nodename`
  62. case "$machine" in
  63. *lm3*)
  64. echo "Lemaitre3"
  65. cp $CHOIX/sources/nemo_lemaitre3_arch-ecconf.fcm.tmpl $TARGET/sources/nemo-3.6/ARCH/arch-ecconf.fcm.tmpl
  66. #cp $CHOIX/sources/runoff-mapper_lemaitre3_Makefile.tmpl $TARGET/sources/runoff-mapper/src/Makefile.tmpl
  67. cp $CHOIX/runtime/classic/platform/lemaitre3.cfg.tmpl $TARGET/runtime/classic/platform/lemaitre3.cfg.tmpl
  68. cat $CHOIX/runtime/classic/lemaitre3.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  69. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  70. ;;
  71. *zenobe*)
  72. echo "Zenobe"
  73. cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl
  74. cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  75. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  76. ;;
  77. *frontal*)
  78. echo "Zenobe"
  79. cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl
  80. cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  81. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  82. ;;
  83. *)
  84. echo "Unknown machine"
  85. ;;
  86. esac
  87. echo "Patch applied to ${TARGET}."