Changeset 8737b88d9b6d483af2a8f09c6f50de7ce0a644a8
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r7218e7c
|
r8737b88
|
|
| 19 | 19 | fi |
| 20 | 20 | |
| | 21 | print_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 | |
| 21 | 29 | if [ $# -lt 1 ]; then |
| 22 | 30 | echo "Usage: `basename $0` <sub-command> [<args>...]" 1>&2 |
| | 31 | print_subcommands |
| 23 | 32 | exit 1 |
| 24 | 33 | fi |
| … |
… |
|
| 26 | 35 | if [ ! -x "$BASEDIR"/pxe/$1 -a ! -x "$BASEDIR"/tester/$1 ]; then |
| 27 | 36 | echo "Invalid pxemngr sub-command $1" 1>&2 |
| | 37 | print_subcommands |
| | 38 | exit 1 |
| 28 | 39 | fi |
| 29 | 40 | |