mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-29 10:49:41 +02:00
define yq as env. variable
This commit is contained in:
@@ -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/')
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user