Skip to content

Commit

Permalink
util (restore-vars): work around "set -u" [lib: add "util.bgproc" for…
Browse files Browse the repository at this point in the history
… "ble/util/bgproc"]
  • Loading branch information
akinomyoga committed Apr 3, 2023
1 parent 4ed4fd4 commit d60758a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ble-core.sh
Expand Up @@ -63,11 +63,11 @@ function ble/util/save-arrs {
}
function ble/util/restore-vars {
local __name __prefix=$1; shift
for __name; do eval "$__name=\"\$$__prefix$__name\""; done
for __name; do eval "$__name=\"\${$__prefix$__name-}\""; done
}
function ble/util/restore-arrs {
local __name __prefix=$1; shift
for __name; do eval "$__name=(\"\${$__prefix$__name[@]}\")"; done
for __name; do eval "$__name=(\${$__prefix$__name[@]+\"\${$__prefix$__name[@]}\"})"; done
}

#%if !release
Expand Down

0 comments on commit d60758a

Please sign in to comment.