From 16196147c5871fc91634507d6494a503872b0a95 Mon Sep 17 00:00:00 2001 From: Guilherme Maluf Balzana Date: Thu, 14 Jul 2022 13:28:04 +0200 Subject: [PATCH] Use _OS_PARAMS as an array in novarc scripts ZHS doesn't deal properly with the space-delimited array of _OS_PARAMS when sourcing novarc*. ``` novarc:unset:5: OS_AUTH_URL ...: invalid parameter name ``` This commit encloses the array so it will work fine in both bash and zsh environments. --- scripts/novarc | 4 ++-- scripts/novarc_unset_all | 4 ++-- scripts/novarcv3_demo_project | 4 ++-- scripts/novarcv3_domain | 4 ++-- scripts/novarcv3_project | 4 ++-- scripts/novarcv3_ssl_domain | 4 ++-- scripts/novarcv3_ssl_project | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/novarc b/scripts/novarc index 2ae0dfb2..b2217116 100644 --- a/scripts/novarc +++ b/scripts/novarc @@ -1,5 +1,5 @@ -_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ') -for param in $_OS_PARAMS; do +_OS_PARAMS=($(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')) +for param in ${_OS_PARAMS[@]}; do if [ "$param" = "OS_AUTH_PROTOCOL" ]; then continue; fi if [ "$param" = "OS_CACERT" ]; then continue; fi unset $param diff --git a/scripts/novarc_unset_all b/scripts/novarc_unset_all index 811e8545..89ae2d55 100644 --- a/scripts/novarc_unset_all +++ b/scripts/novarc_unset_all @@ -1,5 +1,5 @@ -_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ') -for param in $_OS_PARAMS; do +_OS_PARAMS=($(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')) +for param in ${_OS_PARAMS[@]}; do unset $param done unset _OS_PARAMS diff --git a/scripts/novarcv3_demo_project b/scripts/novarcv3_demo_project index cf3b1f9d..f79c1c76 100644 --- a/scripts/novarcv3_demo_project +++ b/scripts/novarcv3_demo_project @@ -1,5 +1,5 @@ -_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ') -for param in $_OS_PARAMS; do +_OS_PARAMS=($(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')) +for param in ${_OS_PARAMS[@]}; do if [ "$param" = "OS_AUTH_PROTOCOL" ]; then continue; fi if [ "$param" = "OS_CACERT" ]; then continue; fi unset $param diff --git a/scripts/novarcv3_domain b/scripts/novarcv3_domain index e896d3c1..6dfa5f50 100644 --- a/scripts/novarcv3_domain +++ b/scripts/novarcv3_domain @@ -1,5 +1,5 @@ -_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ') -for param in $_OS_PARAMS; do +_OS_PARAMS=($(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')) +for param in ${_OS_PARAMS[@]}; do if [ "$param" = "OS_AUTH_PROTOCOL" ]; then continue; fi if [ "$param" = "OS_CACERT" ]; then continue; fi unset $param diff --git a/scripts/novarcv3_project b/scripts/novarcv3_project index 120794e8..66b04703 100644 --- a/scripts/novarcv3_project +++ b/scripts/novarcv3_project @@ -1,5 +1,5 @@ -_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ') -for param in $_OS_PARAMS; do +_OS_PARAMS=($(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')) +for param in ${_OS_PARAMS[@]}; do if [ "$param" = "OS_AUTH_PROTOCOL" ]; then continue; fi if [ "$param" = "OS_CACERT" ]; then continue; fi unset $param diff --git a/scripts/novarcv3_ssl_domain b/scripts/novarcv3_ssl_domain index 4c45c389..89aa0f1b 100644 --- a/scripts/novarcv3_ssl_domain +++ b/scripts/novarcv3_ssl_domain @@ -1,5 +1,5 @@ -_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ') -for param in $_OS_PARAMS; do +_OS_PARAMS=($(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')) +for param in ${_OS_PARAMS[@]}; do if [ "$param" = "OS_AUTH_PROTOCOL" ]; then continue; fi if [ "$param" = "OS_CACERT" ]; then continue; fi unset $param diff --git a/scripts/novarcv3_ssl_project b/scripts/novarcv3_ssl_project index 647b9e7d..bcc3a52e 100644 --- a/scripts/novarcv3_ssl_project +++ b/scripts/novarcv3_ssl_project @@ -1,5 +1,5 @@ -_OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ') -for param in $_OS_PARAMS; do +_OS_PARAMS=($(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd ' ')) +for param in ${_OS_PARAMS[@]}; do if [ "$param" = "OS_AUTH_PROTOCOL" ]; then continue; fi if [ "$param" = "OS_CACERT" ]; then continue; fi unset $param