source: modipsl/trunk/util/w_i_e @ 2296

Last change on this file since 2296 was 728, checked in by bellier, 15 years ago

New version with environmental management

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1009 bytes
Line 
1#!/bin/bash
2# $Id$
3#-------------------------------------------------------------------#
4#- w_i_e                                                21/07/2009 -#
5#- Validate the correlation between the target and the environment -#
6#-------------------------------------------------------------------#
7shopt -s extglob
8#-
9WW_ast='****************************************************************'
10#-
11h_t=${1}; h_w=${2};
12#-
13echo -e "\n${WW_ast}" >&2;
14echo "INFO -  This Makefile is for host type : ${h_t}" >&2;
15echo "INFO -  Host used has type :             ${h_w}" >&2;
16echo -e "${WW_ast}" >&2;
17#-
18if [ ${h_t} = ${h_w} ]; then
19  r_c='OK';
20else
21  r_c='WN'; [[ ${h_t} = sx[89]mercure ]] && { r_c='NO'; }
22fi
23#-
24if   [ ${r_c} = 'WN' ]; then
25 echo "WARNING - This Makefile may not be compatible whith the host !" >&2;
26 echo -e "${WW_ast}" >&2;
27elif [ ${r_c} = 'NO' ]; then
28 echo "ERROR - This Makefile is not compatible whith the host !" >&2;
29 echo -e "${WW_ast}" >&2;
30fi
31#-
32echo ${r_c};
33unset h_t h_w r_c;
34#-
35exit 0;
Note: See TracBrowser for help on using the repository browser.