Skip to content
Snippets Groups Projects
Commit c46527d1 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix: add missing awkenvsubst function

parent 2130eb1a
No related branches found
No related tags found
No related merge requests found
......@@ -259,6 +259,10 @@ stages:
echo "$1" | tr '[:lower:]' '[:upper:]' | tr '[:punct:]' '_'
}
function awkenvsubst() {
awk '{while(match($0,"[$%]{[^}]*}")) {g0=substr($0,RSTART,RLENGTH); val=ENVIRON[substr(g0,3,RLENGTH-3)]; gsub(g0,val)}}1'
}
function pre_apply() {
# maybe execute pre apply script
prescript="$OS_SCRIPTS_DIR/os-pre-apply.sh"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment