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/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS/COMPILE – NEMO

source: branches/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS/COMPILE/Flist_archfile.sh @ 4990

Last change on this file since 4990 was 4148, checked in by cetlod, 10 years ago

merge in trunk changes between r3853 and r3940 and commit the changes, see ticket #1169

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.9 KB
RevLine 
[2143]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#
[3294]21#  $ Flist_archfile.sh Institute
[2143]22#
23#
24# DESCRIPTION
25# ===========
26#
27#
[2520]28# List arch file available.
29# The first line of each file in NEMO/ARCH directory is echoed. 
[2143]30#
[2520]31#
[2143]32# EXAMPLES
33# ========
34#
35# ::
36#
37#  $ ./Flist_archfile.sh
38#
[3294]39#  $ ./Flist_archfile.sh CNRS
[2143]40#
41# TODO
42# ====
43#
44# option debug
45#
46#
47# EVOLUTIONS
48# ==========
49#
50# $Id$
51#
52#
53#
54#   * creation
55#
56#-
[3294]57
58if [ -n "$2" ]; then
59shift
60fi
61
[2143]62echo "Available compilers for -m option :"
[4148]63for file in  $(ls ${MAIN_DIR}/ARCH | grep "fcm$" )
[2143]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
[3294]70
71
72if [ "$1" == "all" ]; then
[4148]73   for dir  in  $(ls ${MAIN_DIR}/ARCH | grep -v "fcm$" )
[3294]74   do
75      echo "Available compilers at ${dir} :"
[4148]76      for file in  $(ls ${MAIN_DIR}/ARCH/${dir} | grep "fcm$" )
[3294]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 :"
[4148]86      for file in  $(ls ${MAIN_DIR}/ARCH/$1 | grep "fcm$" )
[3294]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 :"
[4148]95      for dir  in  $(ls ${MAIN_DIR}/ARCH | grep -v "fcm$" )
[3294]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.