define yq as env. variable

This commit is contained in:
2022-05-17 19:12:51 +02:00
parent 25152acb5e
commit 9a47e7b511
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -95,7 +95,7 @@ pm::read_config(){
}
_get_ol_names(){
yq -Ne eval-all '. as $item ireduce ({}; . *+ $item) |.Overlays|keys()' "${config_files[@]}" | awk '{print $2}'
${yq} -Ne eval-all '. as $item ireduce ({}; . *+ $item) |.Overlays|keys()' "${config_files[@]}" | awk '{print $2}'
}
_get_config_files
@@ -109,7 +109,7 @@ pm::read_config(){
Overlays=( $(_get_ol_names) )
local ol=''
for ol in "${Overlays[@]}"; do
eval $(yq -Ne eval-all \
eval $(${yq} -Ne eval-all \
". as \$item ireduce ({}; . *+ \$item) |.Overlays.${ol}" \
"${config_files[@]}" | \
sed 's/: /=/; s/\(.*\)/local \1/')
+1 -1
View File
@@ -31,7 +31,7 @@ path="/bin:/usr/bin"
[[ ${os_name} == 'Darwin' ]] && path="${libexecdir}:${path}"
std::def_cmds "${path}" \
'awk' 'base64' 'find' 'getopt' 'logger' 'mktemp' \
'rm' 'sort' 'find'
'rm' 'sort' 'find' 'yq'
if [[ ${PMODULES_PURETCL} == yes ]]; then
declare -r modulecmd="${libexecdir}/modulecmd.tcl"