diff options
author | Aaron Ball <nullspoon@oper.io> | 2018-04-09 14:23:46 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2018-04-09 14:23:46 -0600 |
commit | e65c119036e53bdde6690820b42c475c5a90a98f (patch) | |
tree | 77f93b71103995e448c57731257a4b8a7954b5ab | |
parent | c21f0be59b2f8e451b937274fcf75c356fb1de00 (diff) | |
download | pkgself-e65c119036e53bdde6690820b42c475c5a90a98f.tar.gz pkgself-e65c119036e53bdde6690820b42c475c5a90a98f.tar.xz |
libinstall/template:Fix variable unset check
Previously, we checked if the variable was empty and errored as if it
was unset. This did not allow for variables that needed an empty value.
Now we check if the variable is set and error on that. Empty is now a
valid value.
-rw-r--r-- | libinstall/template.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libinstall/template.sh b/libinstall/template.sh index 35b79b6..4890042 100644 --- a/libinstall/template.sh +++ b/libinstall/template.sh @@ -34,7 +34,7 @@ template() { for _var in ${_vars[@]}; do _varref="$(printf ${_var} | cut -d ' ' -f 2)" - if [ -z "${!_varref:-}" ]; then + if [ -z "${!_varref+x}" ]; then printf "Template %s variable '%s' is not set. Skipping.\n" \ "$(basename ${_src})" \ "${_varref}" |