Changeset 8737b88d9b6d483af2a8f09c6f50de7ce0a644a8

Show
Ignore:
Timestamp:
02/12/09 19:14:46 (3 years ago)
Author:
Frederic Lepied <frederic.lepied@…>
Children:
7137c4457e2c1d57a509e2e5893da3b165f2a5b3
Parents:
3d3414278502ad60842ab623bcae9692a7b9ec7b
git-committer:
Frederic Lepied <frederic.lepied@…> (02/12/09 19:14:46)
Message:

display sub-command names

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pxe/pxemngr

    r7218e7c r8737b88  
    1919fi 
    2020 
     21print_subcommands() { 
     22    echo "Available sub-commands:" 
     23    cd "$BASEDIR"/pxe/$1 
     24    find . -perm -111 -a -type f|sed 's@./@    @' 
     25    cd "$BASEDIR"/tester/$1 
     26    find . -perm -111 -a -type f|sed 's@./@    @' 
     27} 
     28 
    2129if [ $# -lt 1 ]; then 
    2230    echo "Usage: `basename $0` <sub-command> [<args>...]" 1>&2 
     31    print_subcommands 
    2332    exit 1 
    2433fi 
     
    2635if [ ! -x "$BASEDIR"/pxe/$1 -a ! -x "$BASEDIR"/tester/$1 ]; then 
    2736    echo "Invalid pxemngr sub-command $1" 1>&2 
     37    print_subcommands 
     38    exit 1 
    2839fi 
    2940