diff options
Diffstat (limited to 'hydras')
-rwxr-xr-x | hydras | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -21,20 +21,31 @@ # Basename configuration BASENAME="`basename $0`" -if [ -z "$1" ]; then +function usage { echo "usage: $BASENAME <hydra1> [<hydra2> ... <hydraN>] -- <command>" + exit 1 +} + +if [ -z "$1" ]; then + usage fi for param in $*; do shift if [ "$param" == "--" ]; then + has_delimiter="1" break fi hydras="$hydras $param" done +if [ -z "$has_delimiter" ]; then + echo "missing command delimiter --" + usage +fi + for hydra in $hydras; do echo "Issuing $* on hydra $hydra..." hydra $hydra $* |