diff options
Diffstat (limited to 'lib/hydra/action')
-rw-r--r-- | lib/hydra/action | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/hydra/action b/lib/hydra/action index b5d76a9..868f301 100644 --- a/lib/hydra/action +++ b/lib/hydra/action @@ -41,3 +41,10 @@ function hydra_get_command { function hydra_dispatch { hydra_exec $ACTION $* } + +# Evaluate a parameter from the config file +function hydra_eval_parameter { + if [ -e "$CONFIG" ] && grep -qe "^$1=" $CONFIG; then + grep -e "^$1=" $CONFIG | tail -n 1 | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//' + fi +} |