wg-quick: use printf -v instead of namerefs for bash 4.2

I'm not happy about this.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2017-06-27 22:18:13 +02:00
parent cf4b3ebd08
commit d3ebbaccab
1 changed files with 2 additions and 3 deletions

View File

@ -54,10 +54,9 @@ parse_options() {
} }
read_bool() { read_bool() {
local -n out="$1"
case "$2" in case "$2" in
true) out=1 ;; true) printf -v "$1" 1 ;;
false) out=0 ;; false) printf -v "$1" 0 ;;
*) die "\`$2' is neither true nor false" *) die "\`$2' is neither true nor false"
esac esac
} }