New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Flist_archfile.sh in branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/TOOLS/COMPILE – NEMO

source: branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/TOOLS/COMPILE/Flist_archfile.sh @ 9270

Last change on this file since 9270 was 6486, checked in by davestorkey, 8 years ago

Remove SVN keywords from UKMO/dev_r5518_GO6_package branch.

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/bash
2#set -x
3set -o posix
4#set -u
5#set -e
6#+
7#
8# ==================
9# Flist_archfile.sh
10# ==================
11#
12# --------------------------
13# Check the compilation file
14# --------------------------
15#
16# SYNOPSIS
17# ========
18#
19# ::
20#
21#  $ Flist_archfile.sh Institute
22#
23#
24# DESCRIPTION
25# ===========
26#
27#
28# List arch file available.
29# The first line of each file in NEMO/ARCH directory is echoed. 
30#
31#
32# EXAMPLES
33# ========
34#
35# ::
36#
37#  $ ./Flist_archfile.sh
38#
39#  $ ./Flist_archfile.sh CNRS
40#
41# TODO
42# ====
43#
44# option debug
45#
46#
47# EVOLUTIONS
48# ==========
49#
50# $Id: Flist_archfile.sh 4148 2013-11-04 12:54:28Z cetlod $
51#
52#
53#
54#   * creation
55#
56#-
57
58if [ -n "$2" ]; then
59shift
60fi
61
62echo "Available compilers for -m option :"
63for file in  $(ls ${MAIN_DIR}/ARCH | grep "fcm$" )
64do
65zvar1=${file#arch-}
66zvar2=$(head -1 ${MAIN_DIR}/ARCH/$file)
67#echo "${zvar1%.fcm} : ${zvar2#\#}"
68printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}"
69done
70
71
72if [ "$1" == "all" ]; then
73   for dir  in  $(ls ${MAIN_DIR}/ARCH | grep -v "fcm$" )
74   do
75      echo "Available compilers at ${dir} :"
76      for file in  $(ls ${MAIN_DIR}/ARCH/${dir} | grep "fcm$" )
77      do
78      zvar1=${file#arch-}
79      zvar2=$(head -1 ${MAIN_DIR}/ARCH/${dir}/$file)
80      #echo "${zvar1%.fcm} : ${zvar2#\#}"
81      printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}"
82      done
83   done
84elif [ -d ${MAIN_DIR}/ARCH/${1} ]; then
85      echo "Available compilers at $1 :"
86      for file in  $(ls ${MAIN_DIR}/ARCH/$1 | grep "fcm$" )
87      do
88      zvar1=${file#arch-}
89      zvar2=$(head -1 ${MAIN_DIR}/ARCH/${1}/$file)
90      #echo "${zvar1%.fcm} : ${zvar2#\#}"
91      printf "%-20s %s %-s\n" "${zvar1%.fcm}" : "${zvar2#\#}"
92      done
93else
94      echo "Available consortium member sub-directories :"
95      for dir  in  $(ls ${MAIN_DIR}/ARCH | grep -v "fcm$" )
96      do
97         echo ${dir}
98      done
99      echo "use \"makenemo -h all\" or \"makenemo -m help\" to see compilers available in member's sub-directories"
100fi
Note: See TracBrowser for help on using the repository browser.