Changeset 19453


Ignore:
Timestamp:
2009-05-13T17:01:50+12:00 (15 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.)

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.