source: trunk/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh @ 3294

Last change on this file since 3294 was 3294, checked in by rblod, 9 years ago

Merge of 3.4beta into the trunk

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1#!/bin/bash
2#set -x
3set -o posix
4#set -u
5#set -e
6#+
7#
8# ==================
9# Fcheck_archfile.sh
10# ==================
11#
12# --------------------------
13# Check the compilation file
14# --------------------------
15#
16# SYNOPSIS
17# ========
18#
19# ::
20#
21#  $ Fcheck_archfile.sh
22#
23#
24# DESCRIPTION
25# ===========
26#
27#
28# Check the choice of the compiler.
29# Three cases : 
30#
31# - There was a previous choice
32# - A new one has be specified, we use this one
33# - No information, exit
34#
35# We use TOOLS/COMPILE/arch.fcm to see if something was chosen.
36#
37# EXAMPLES
38# ========
39#
40# ::
41#
42#  $ ./Fcheck_archfile.sh ARCHFILE COMPILER
43#
44#
45# TODO
46# ====
47#
48# option debug
49#
50#
51# EVOLUTIONS
52# ==========
53#
54# $Id$
55#
56#
57#
58#   * creation
59#
60#-
61
62if [ ${#2} -eq 0 ]; then
63   if [ ! -f ${COMPIL_DIR}/$1 ]; then
64   echo "Warning !!!"
65   echo "NO compiler chosen"
66   echo "Try makenemo -h for help"
67   echo "EXITING..."
68   exit 1
69   fi
70else
71   myfile=$( find ${MAIN_DIR}/ARCH -name arch-${2}.fcm -print )
72   if [ ${#myfile} -gt 0 ]; then
73      ln -sf  ${myfile} ${COMPIL_DIR}/$1
74   else
75      echo "Warning !!!"
76      echo "Compiler not existing"
77      echo "Try makenemo -h for help"
78      echo "EXITING..."
79      exit 1       
80   fi   
81fi
Note: See TracBrowser for help on using the repository browser.