bootstrap: simplify export_variables
Nameref attribute (local -n) is a Bash 4.3 feature, thus not available on OSX with Bash 3.2. And because we know the argument looks like a valid assignment, we can pass it whole to export.
This commit is contained in:
parent
d38d16ade9
commit
0bddff6977
1 changed files with 1 additions and 2 deletions
|
@ -139,8 +139,7 @@ function export_variables() {
|
|||
do
|
||||
if [[ "$arg" =~ ^[[:alpha:]][_[:alnum:]]*= ]]
|
||||
then
|
||||
local -n var="${arg%%=*}"
|
||||
export var="${arg#*=}"
|
||||
export "$arg"
|
||||
else
|
||||
printf >&2 "bootstrap.sh: invalid argument: %s\n" "$arg"
|
||||
ret=1
|
||||
|
|
Loading…
Reference in a new issue