confz

git mirror of https://ccx.te2000.cz/bzr/confz
git clone https://ccx.te2000.cz/git/confz
Log | Files | Refs

commit 5cf75fbd4bed936ee9c379682d6c3ed27a787b06
parent 7a411589f8dcd36b6824839a9e6860c164378911
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Thu, 26 Jun 2014 20:08:30 +0200

protect checkvars from undefined variable
Diffstat:
Mbin/confz | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/confz b/bin/confz @@ -60,7 +60,9 @@ checkvars() { local var local -a empty for var in "$@"; do - [[ -z $vars[$var] ]] && empty+=( $var ) + if ! (($+vars[$var])) || [[ -z $vars[$var] ]]; then + empty+=( $var ) + fi done (( $#empty )) && die "required parameters are empty: ${(@q)empty}" }