diff options
Diffstat (limited to 'lib/hydra/config')
-rw-r--r-- | lib/hydra/config | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/hydra/config b/lib/hydra/config index 5390159..da49ec7 100644 --- a/lib/hydra/config +++ b/lib/hydra/config @@ -83,3 +83,14 @@ function hydra_bootstrap_config { make config ) } + +# Get a configuration parameter if not previously defined by a sourced file +function hydra_user_config { + local param="$1" + local default="$2" + shift 2 + + if [ -z "`eval echo '$'$param`" ]; then + hydra_user_input $param $default $* + fi +} |