diff options
author | Richard Ipsum <richardipsum@fastmail.co.uk> | 2015-04-07 11:08:31 +0100 |
---|---|---|
committer | Richard Ipsum <richardipsum@fastmail.co.uk> | 2015-04-07 11:08:31 +0100 |
commit | 48ea25d78976d259070f89dfa2b9a3293c337b6c (patch) | |
tree | 0a7cac4c53b1ebaed0ab84fa41fe21f2d5bb98a5 | |
parent | 87cb65346c1e24fa318c1eeb35d7ae24d22c1272 (diff) | |
download | definitions-48ea25d78976d259070f89dfa2b9a3293c337b6c.tar.gz |
add locals to validate_non_empty
-rw-r--r-- | swift-storage.configure | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/swift-storage.configure b/swift-storage.configure index 315a1d31..563b0ed0 100644 --- a/swift-storage.configure +++ b/swift-storage.configure @@ -32,9 +32,12 @@ validate_number() { } validate_non_empty() { - if [[ $2 = None ]] + local name="$1" + local value="$2" + + if [[ $value = None ]] then - echo "'$1' cannot be empty" >&2 + echo "'$name' cannot be empty" >&2 exit 1 fi } |