Changeset 14 for trunk/install.sh


Ignore:
Timestamp:
06/07/07 17:29:19 (17 years ago)
Author:
smasson
Message:

can give the answer with input parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/install.sh

    r2 r14  
    1212# 
    1313# update 
     14# smasson 2007-06-07T16:43:42Z arete.locean-ipsl.upmc.fr (Darwin) 
     15# can give the answer with input parameters 
    1416# fplod 2007-04-26T11:51:42Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1517# 
     
    1820DIRWWW=/tmp/bibopa/ 
    1921# 
    20 echo "Do you want to install on ${DIRFINALLOCEAN}  (y|[n]) ?" 
    21 answer=" " 
    22 #read answer  
    23 answer=n 
     22answer=${1:-" "} 
     23case ${answer} in 
     24    y|Y|n|N) 
     25        ;; 
     26    *) 
     27        echo "Do you want to install on ${DIRFINALLOCEAN}  (y|[n]) ?" 
     28        read answer    
     29        ;; 
     30esac 
    2431case ${answer} in 
    2532 y|Y) 
     
    3744DIRFINALLOCEAN=opatlod@cerbere.locean-ipsl.upmc.fr:NEMO/general/biblio_new/ 
    3845# 
    39 echo "Do you want to install on ${DIRFINALLOCEAN}  (y|[n]) ?" 
    40 answer=" " 
    41 #read answer 
    42 answer=y 
     46answer=${2:-" "} 
     47case ${answer} in 
     48    y|Y|n|N) 
     49        ;; 
     50    *) 
     51        echo "Do you want to install on ${DIRFINALLOCEAN}  (y|[n]) ?" 
     52        read answer    
     53        ;; 
     54esac 
    4355case ${answer} in 
    4456 y|Y) 
Note: See TracChangeset for help on using the changeset viewer.