source: branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/TOOLS/COMPILE/Fread_dir.sh @ 5445

Last change on this file since 5445 was 5445, checked in by davestorkey, 5 years ago

Clear SVN keywords from 2015/dev_r5021_UKMO1_CICE_coupling branch.

  • Property svn:executable set to *
File size: 1.1 KB
RevLine 
[1972]1#!/bin/bash
2#set -x
3set -o posix
4#set -u
5#set -e
6#+
7#
8# ============
9# Fread_dir.sh
10# ============
11#
[2520]12# ---------------------
[1972]13# Read user directories
[2520]14# ---------------------
[1972]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#
[5445]47# $Id: Fread_dir.sh 3294 2012-01-28 16:44:18Z rblod $
[1972]48#
49#
50#
51#   * creation
52#
53#-
54
55if [ "$2" == "YES" ]; then
56   echo -n " $1 [Y/n] "
57   read answer
58   answer=`echo $answer | sed 's/^[yY].*$/y/'`
59   if [  -z "$answer" -o "x$answer" = "xy" ]; then
60      TAB[$ind]="$1"
61      let ind=ind+1
62      echo " $1 selected "
63      echo "  "
64   else
65      echo " $1 Not selected "
66      echo "  "
67   fi
68   unset -v answer
69else
70   echo -n " $1 [y/N] "
71   read answer
72   answer=`echo $answer | sed 's/^[nN].*$/N/'`
73   if [ "x$answer" = "xy" ]; then
74      TAB[$ind]="$1"
[2542]75      let ind=ind+1
[1972]76      echo " $1 selected "
77      echo "  "
78   else
79      echo " $1 Not selected "
80      echo "  "
81   fi
82   unset -v answer
[2143]83fi
Note: See TracBrowser for help on using the repository browser.