Fcopy_extdir.sh 849 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. #set -x
  3. set -o posix
  4. #set -u
  5. #set -e
  6. #+
  7. # ============
  8. # Fcopy_extdir.sh
  9. # ============
  10. # --------------------------
  11. # Copy a reference directory
  12. # --------------------------
  13. # SYNOPSIS
  14. # ========
  15. # ::
  16. # $ Fcopy_extdir.sh
  17. # DESCRIPTION
  18. # ===========
  19. # When an unsupported configuration is requested,
  20. # Prepare sources for the NEMO sub-directories needed (OPA_SRC, TOP_SRC ...)
  21. # EXAMPLES
  22. # ========
  23. # ::
  24. # $ ./Fcopy_extdir.sh ORCA2_LIM
  25. # TODO
  26. # ====
  27. # option debug
  28. # EVOLUTIONS
  29. # ==========
  30. # $Id: Fcopy_extdir.sh 3294 2012-01-28 16:44:18Z rblod $
  31. # * creation
  32. #-
  33. grep "$1 " ${CONFIG_DIR}/uspcfg.txt > ${CONFIG_DIR}/cfg.tmp
  34. #
  35. LOCAL_REF=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $2}')
  36. TAB=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $3}')
  37. REMOTE_CTL=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $4}')
  38. #
  39. \rm ${CONFIG_DIR}/cfg.tmp