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

View file

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