diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-11-01 15:04:12 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-11-01 15:04:12 -0200 |
commit | ae81b5792157b0e9828dec0264c906f65159c47e (patch) | |
tree | 3079c1c4e808caa98e53c7858c72430ca9d15464 /lib | |
parent | 69ba766373b5247cf28eb8aa4308ac679b1b5c71 (diff) | |
download | hydra-ae81b5792157b0e9828dec0264c906f65159c47e.tar.gz hydra-ae81b5792157b0e9828dec0264c906f65159c47e.tar.bz2 |
Usage functions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hydra/misc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/hydra/misc b/lib/hydra/misc index 88ffec1..4695d5f 100644 --- a/lib/hydra/misc +++ b/lib/hydra/misc @@ -70,12 +70,7 @@ function hydra_exec { # Set needed environment variables and do basic checks. function hydra_set_env { - if [ -z "$1" ]; then - echo "Error: missing arguments for hydra_set_env" - exit 1 - fi - - ACTION="$1" + export ACTION="$1" } # Get a command argument @@ -100,6 +95,17 @@ function hydra_action_usage { fi } +# Action dispatcher function hydra_dispatch { hydra_exec $ACTION $* } + +# Hydra usage +function hydra_usage_hydra { + echo "Usage: hydra [hydra] <command> [arguments]" +} + +# Hydra ctl usage +function hydra_usage_hydractl { + echo "Usage: hydractl <command> [arguments]" +} |