Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Write os-var replaced .src file to temp file, and rename #938

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion priv/templates/extended_bin
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ make_out_file_path() {

# Replace environment variables
replace_os_vars() {
TEMP_OUT=$(mktemp "$2".XXXXXX)
awk '{
while(match($0,"[$]{[^}]*}")) {
var=substr($0,RSTART+2,RLENGTH -3)
Expand All @@ -460,7 +461,8 @@ replace_os_vars() {
gsub("[$]{"var"}",e)
}
}
}1' < "$1" > "$2"
}1' < "$1" >> "$TEMP_OUT"
mv "$TEMP_OUT" "$2"
}

add_path() {
Expand Down
Loading