Compare commits

..

No commits in common. "fb87d0e687228192e6667cb60e217b1bff42436e" and "574146c75eec22fb4357f8b4e11d5f7c2761d4bd" have entirely different histories.

View File

@ -45,12 +45,9 @@ tagsManagerUpdateUniversalTag()
esc_placeholder=$(printf '%s' "$current_placeholder" | sed 's/[][\\.*^$/|]/\\&/g') esc_placeholder=$(printf '%s' "$current_placeholder" | sed 's/[][\\.*^$/|]/\\&/g')
esc_new=$(printf '%s' "$new_content" | sed 's/[\\&|]/\\&/g') esc_new=$(printf '%s' "$new_content" | sed 's/[\\&|]/\\&/g')
# Single-pass substitution, scoped to lines carrying this tag's annotation. # Single-pass substitution, scoped to lines carrying this tag's
# The in-place edit runs AS the file's owner (no root): under # annotation. The annotation's default-value field and any matching
# /docker/containers/<app> that's the docker install user (runFileOp); the # placeholder in the body of the same line both update together
# manager-owned configs/ + install templates use runInstallOp. The read # (they start identical and stay identical after each call).
# (awk above) needs no escalation — config/compose files are world-readable. sed -i "/#LIBREPORTAL|${tag_name}|/s|${esc_placeholder}|${esc_new}|g" "$file_path"
local op="runInstallOp"
[[ "$file_path" == "$containers_dir"* || "$file_path" == /docker/containers/* ]] && op="runFileOp"
$op sed -i "/#LIBREPORTAL|${tag_name}|/s|${esc_placeholder}|${esc_new}|g" "$file_path"
} }