aboutsummaryrefslogtreecommitdiff
path: root/hydra
diff options
context:
space:
mode:
Diffstat (limited to 'hydra')
-rwxr-xr-xhydra17
1 files changed, 11 insertions, 6 deletions
diff --git a/hydra b/hydra
index fcb3e62..f8d695a 100755
--- a/hydra
+++ b/hydra
@@ -49,19 +49,24 @@ function hydra_load {
source $APP_BASE/lib/hydra/functions || exit 1
}
-# Command-line parameters
+# Basename
BASENAME="`basename $0`"
-ACTION="$1"
+
+# Adjust hydra parameter
+if [ "$BASENAME" == "hydra" ]; then
+ export HYDRA="$1"
+ shift
+fi
+
+# Load
+hydra_load $*
# Command-line parser
if [ -z "$ACTION" ]; then
- echo "usage: $BASENAME <command> [arguments]"
+ echo "usage: $BASENAME [hydra] <command> [arguments]"
exit 1
fi
-# Load functions
-hydra_load $*
-
# Dispatch
if hydra_has_action $ACTION; then
hydra_dispatch $*