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:
		
							parent
							
								
									cf4b3ebd08
								
							
						
					
					
						commit
						d3ebbaccab
					
				@ -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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user