From 5e4da2d00e1def10bf5a19110f5a44cec780b495 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 27 Jun 2017 22:18:13 +0200 Subject: wg-quick: use printf -v instead of namerefs for bash 4.2 I'm not happy about this. --- src/tools/wg-quick.bash | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/tools/wg-quick.bash') diff --git a/src/tools/wg-quick.bash b/src/tools/wg-quick.bash index 6edcd3a..243f35d 100755 --- a/src/tools/wg-quick.bash +++ b/src/tools/wg-quick.bash @@ -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 } -- cgit v1.2.3-59-g8ed1b