Changeset 19453

Show
Ignore:
Timestamp:
13.05.2009 17:01:50 (10 years ago)
Author:
ak19
Message:

Usage in its own subroutine. Switch on target commands now has a default clause which prints the usage. (Noticed the need for this when I found that the target configure-port is no longer available.)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/gsicontrol.sh

    r19257 r19453  
    159159} 
    160160 
    161  
    162 if [[ $# < 1  || $# > 2 ]] ; then 
     161function usage { 
    163162    echo "" 
    164163    echo "   Usage: $0 <command>" 
     
    176175    echo "   web-stop-tested" 
    177176    echo "" 
     177} 
     178 
     179 
     180if [[ $# < 1  || $# > 2 ]] ; then 
     181    usage 
    178182    exit 0 
    179183fi 
     
    205209    web-stop-tested) 
    206210    web-stop-tested;; 
     211    *) 
     212    echo 
     213        echo "Command unrecognised: $target" 
     214    usage;; 
     215 
    207216esac 
    208217