Fmake_config.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/bash
  2. #set -x
  3. set -o posix
  4. #set -u
  5. #set -e
  6. #+
  7. #
  8. # ===============
  9. # Fmake_config.sh
  10. # ===============
  11. #
  12. # ---------------
  13. # Make the config
  14. # ---------------
  15. #
  16. # SYNOPSIS
  17. # ========
  18. #
  19. # ::
  20. #
  21. # $ Fmake_config.sh
  22. #
  23. #
  24. # DESCRIPTION
  25. # ===========
  26. #
  27. #
  28. # - Make the config directory
  29. # - Create repositories needed :
  30. #
  31. # - EXP00 for namelist
  32. # - MY_SRC for user sources
  33. # - BLD for compilation
  34. #
  35. # EXAMPLES
  36. # ========
  37. #
  38. # ::
  39. #
  40. # $ ./Fmake_config.sh CONFIG_NAME REF_CONFIG_NAME
  41. #
  42. #
  43. # TODO
  44. # ====
  45. #
  46. # option debug
  47. #
  48. #
  49. # EVOLUTIONS
  50. # ==========
  51. #
  52. # $Id: Fmake_config.sh 3715 2012-11-28 16:06:02Z acc $
  53. #
  54. #
  55. #
  56. # * creation
  57. #
  58. #-
  59. \mkdir ${1}
  60. \mkdir ${1}/EXP00
  61. \mkdir ${1}/MY_SRC
  62. \cp -R ${2}/cpp_${2}.fcm ${1}/cpp_${1}.fcm
  63. \cp -R ${2}/EXP00/*namelist* ${1}/EXP00/.
  64. [ -f ${2}/EXP00/AGRIF_FixedGrids.in ] && \cp -R ${2}/EXP00/AGRIF_FixedGrids.in ${1}/EXP00/.
  65. [ -f ${2}/EXP00/iodef.xml ] && \cp -R ${2}/EXP00/iodef.xml ${1}/EXP00/.
  66. [ -f ${2}/EXP00/field_def.xml ] && \cp -R ${2}/EXP00/field_def.xml ${1}/EXP00/.
  67. [ -f ${2}/EXP00/file_def.xml ] && \cp -R ${2}/EXP00/file_def.xml ${1}/EXP00/.
  68. [ -f ${2}/EXP00/domain_def.xml ] && \cp -R ${2}/EXP00/domain_def.xml ${1}/EXP00/.
  69. [ -f ${2}/EXP00/xmlio_server.def ] && \cp -R ${2}/EXP00/xmlio_server.def ${1}/EXP00/.
  70. [ -d ${2}/MY_SRC ] && \cp ${2}/MY_SRC/* ${1}/MY_SRC/. 2> /dev/null