From 0bddff6977340f8863791dcecc64f1e0aaaa1f46 Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Fri, 3 Jan 2020 15:38:48 +0100 Subject: [PATCH] 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. --- bootstrap.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 1fbaabd24..ee9c714bd 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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