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.
Fread_dir.sh in branches/DEV_r1879_FCM/NEMOGCM/TOOLS – NEMO

source: branches/DEV_r1879_FCM/NEMOGCM/TOOLS/Fread_dir.sh @ 1972

Last change on this file since 1972 was 1972, checked in by flavoni, 14 years ago

Add TOOLS directory and scripts to compile with FCM, see ticket: #685

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/bash
2#set -x
3set -o posix
4#set -u
5#set -e
6#+
7#
8# ============
9# Fread_dir.sh
10# ============
11#
12# --------------------------
13# Read user directories
14# --------------------------
15#
16# SYNOPSIS
17# ========
18#
19# ::
20#
21#  $ Fread_dir.sh
22#
23#
24# DESCRIPTION
25# ===========
26#
27#
28# Read directoires needed from standard input
29#
30# EXAMPLES
31# ========
32#
33# ::
34#
35#  $ ./Fread_dir.sh Directory_NAME YES/NO
36#
37#
38# TODO
39# ====
40#
41# option debug
42#
43#
44# EVOLUTIONS
45# ==========
46#
47# $Id$
48#
49#
50# - rblod 2010-06-20T16:11:47Z
51#
52#   * creation
53#
54#-
55
56if [ "$2" == "YES" ]; then
57   echo -n " $1 [Y/n] "
58   read answer
59   answer=`echo $answer | sed 's/^[yY].*$/y/'`
60   if [  -z "$answer" -o "x$answer" = "xy" ]; then
61      TAB[$ind]="$1"
62      let ind=ind+1
63      echo " $1 selected "
64      echo "  "
65   else
66      echo " $1 Not selected "
67      echo "  "
68   fi
69   unset -v answer
70else
71   echo -n " $1 [y/N] "
72   read answer
73   answer=`echo $answer | sed 's/^[nN].*$/N/'`
74   if [ "x$answer" = "xy" ]; then
75      TAB[$ind]="$1"
76      let ind =ind+1
77      echo " $1 selected "
78      echo "  "
79   else
80      echo " $1 Not selected "
81      echo "  "
82   fi
83   unset -v answer
84fi
Note: See TracBrowser for help on using the repository browser.