Turns out we only supported bash 4.3, this commit swaps typeset for eval

This commit is contained in:
Dylan 2016-01-21 00:37:31 +11:00
parent 928bbf0760
commit db26756ea7
1 changed files with 4 additions and 5 deletions

9
fetch
View File

@ -1319,14 +1319,13 @@ printinfo () {
function=${info#*: } function=${info#*: }
subtitle=${info%:*} subtitle=${info%:*}
# Update the var
case "$function" in case "$function" in
"get"*) "get"*)
var=${function/get/}
typeset -n output=$var
# Call the function # Call the function
[ -z "$output" ] && $function $function 2>/dev/null
# Update the variable
eval output="\$${function/get/}"
;; ;;
esac esac