install.sh 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #!/bin/bash
  2. echo "##################"
  3. echo "Release you want :"
  4. echo "##################"
  5. repertoirdebase=`pwd`
  6. PS3='> ' # le prompt
  7. COMPIL=("dev" "trunk" "primavera" "3.2.2" "3.2.3" "3.3.0" "3.3.1" "3.3.3.2")
  8. select CHOIX in "${COMPIL[@]}" ; do
  9. case $REPLY in
  10. 1)
  11. TAG="ecearth_$CHOIX"
  12. CHOIX="3.2.2"
  13. echo ""
  14. ;;
  15. 2)
  16. TAG="ecearth_$CHOIX"
  17. cp $CHOIX/runtime/classic/ctrl/namelist.nemo-ORCA1L75-coupled.cfg.sh $HOME/modeles/ecearth/ecearth_${CHOIX}/runtime/classic/ctrl
  18. echo ""
  19. ;;
  20. *)
  21. TAG="ecearth_$CHOIX"
  22. echo ""
  23. ;;
  24. esac
  25. break
  26. done
  27. TARGET="$HOME/modeles/ecearth/$TAG"
  28. case "$CHOIX" in
  29. *3.3.0)
  30. echo "3.3.0 release"
  31. sed -i '$ d' $TARGET/sources/config-build.xml
  32. cat $CHOIX/sources/config-build.xml >> $TARGET/sources/config-build.xml
  33. cp $CHOIX/sources/zenobe-intelmpi.xml $TARGET/sources/platform
  34. cp $CHOIX/sources/lemaitre3-intelmpi.xml $TARGET/sources/platform
  35. #
  36. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  37. cp $CHOIX/runtime/classic/platform/zenobe-intelmpi.xml $TARGET/runtime/classic/platform
  38. cp $CHOIX/runtime/classic/platform/lemaitre3-intelmpi.xml $TARGET/runtime/classic/platform
  39. ;;
  40. *3.3.1)
  41. echo "3.3.1 release"
  42. sed -i '$ d' $TARGET/sources/config-build.xml
  43. cat $CHOIX/sources/config-build.xml >> $TARGET/sources/config-build.xml
  44. cp $CHOIX/sources/zenobe-intelmpi.xml $TARGET/sources/platform
  45. cp $CHOIX/sources/lemaitre3-intelmpi.xml $TARGET/sources/platform
  46. #
  47. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  48. cp $CHOIX/runtime/classic/platform/zenobe-intelmpi.xml $TARGET/runtime/classic/platform
  49. cp $CHOIX/runtime/classic/platform/lemaitre3-intelmpi.xml $TARGET/runtime/classic/platform
  50. ;;
  51. *3.3.3.2*)
  52. echo "New 3.3.3.2 release"
  53. sed -i '$ d' $TARGET/sources/config-build.xml
  54. cat $CHOIX/sources/config-build.xml >> $TARGET/sources/config-build.xml
  55. cp $CHOIX/sources/zenobe-intelmpi.xml $TARGET/sources/platform
  56. #
  57. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  58. cp $CHOIX/runtime/classic/platform/zenobe-intelmpi.xml $TARGET/runtime/classic/platform
  59. ;;
  60. *3.2.3*)
  61. echo "3.2.3 release"
  62. cp $CHOIX/sources/config-build.xml $TARGET/sources/config-build.xml
  63. cp $CHOIX/sources/zenobe-intelmpi.xml $TARGET/sources/platform
  64. cp $CHOIX/sources/lemaitre3-intelmpi.xml $TARGET/sources/platform
  65. #
  66. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  67. cp $CHOIX/runtime/classic/zenobe-intelmpi.xml $TARGET/runtime/classic/platform
  68. cp $CHOIX/runtime/classic/lemaitre3-intelmpi.xml $TARGET/runtime/classic/platform
  69. ;;
  70. *primavera*)
  71. echo "Primavera release"
  72. sed -i '$ d' $TARGET/sources/config-build.xml
  73. cat $CHOIX/sources/config-build.xml >> $TARGET/sources/config-build.xml
  74. #
  75. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  76. #
  77. ;;
  78. *)
  79. echo "<3.2.2 release"
  80. cp $CHOIX/sources/config-build.xml $TARGET/sources/config-build.xml
  81. #
  82. cp $CHOIX/runtime/classic/config-run.xml $TARGET/runtime/classic/config-run.xml
  83. ;;
  84. esac
  85. machine=`uname --nodename`
  86. case "$machine" in
  87. *lm3*)
  88. echo "Lemaitre3"
  89. cp $CHOIX/sources/nemo_lemaitre3_arch-ecconf.fcm.tmpl $TARGET/sources/nemo-3.6/ARCH/arch-ecconf.fcm.tmpl
  90. #cp $CHOIX/sources/runoff-mapper_lemaitre3_Makefile.tmpl $TARGET/sources/runoff-mapper/src/Makefile.tmpl
  91. cp $CHOIX/runtime/classic/platform/lemaitre3.cfg.tmpl $TARGET/runtime/classic/platform/lemaitre3.cfg.tmpl
  92. cat $CHOIX/runtime/classic/lemaitre3.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  93. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  94. ;;
  95. *zenobe*)
  96. echo "Zenobe"
  97. cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl
  98. cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  99. cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-esm.sh.tmpl
  100. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  101. cat $CHOIX/runtime/classic/ece-esm.sh.tmpl >> $TARGET/runtime/classic/ece-esm.sh.tmpl
  102. #cp util/arch-frontal3.fcm $TARGET/sources/nemo-3.6/ARCH/
  103. ;;
  104. *frontal*)
  105. echo "Zenobe"
  106. cp $CHOIX/runtime/classic/platform/zenobe.cfg.tmpl $TARGET/runtime/classic/platform/zenobe.cfg.tmpl
  107. cat $CHOIX/runtime/classic/zenobe.sh.tmpl > $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  108. cat $CHOIX/runtime/classic/ece-ifs+nemo.sh.tmpl >> $TARGET/runtime/classic/ece-ifs+nemo.sh.tmpl
  109. #cp util/arch-frontal3.fcm $TARGET/sources/nemo-3.6/ARCH/
  110. ;;
  111. *)
  112. echo "Unknown machine"
  113. ;;
  114. esac
  115. echo "Patch applied to ${TARGET}"