From: Jason A. Donenfeld Date: Tue, 27 Jun 2017 20:18:13 +0000 (+0200) Subject: wg-quick: use printf -v instead of namerefs for bash 4.2 X-Git-Tag: v1.0.20191226~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3ebbaccab322021614949de3081671c44b5aefe;p=thirdparty%2Fwireguard-tools.git wg-quick: use printf -v instead of namerefs for bash 4.2 I'm not happy about this. Signed-off-by: Jason A. Donenfeld --- diff --git a/src/wg-quick.bash b/src/wg-quick.bash index 6edcd3a..243f35d 100755 --- a/src/wg-quick.bash +++ b/src/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 }