Merge claude/1
This commit is contained in:
commit
fb87d0e687
@ -45,9 +45,12 @@ 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
|
# Single-pass substitution, scoped to lines carrying this tag's annotation.
|
||||||
# annotation. The annotation's default-value field and any matching
|
# The in-place edit runs AS the file's owner (no root): under
|
||||||
# placeholder in the body of the same line both update together
|
# /docker/containers/<app> that's the docker install user (runFileOp); the
|
||||||
# (they start identical and stay identical after each call).
|
# manager-owned configs/ + install templates use runInstallOp. The read
|
||||||
sed -i "/#LIBREPORTAL|${tag_name}|/s|${esc_placeholder}|${esc_new}|g" "$file_path"
|
# (awk above) needs no escalation — config/compose files are world-readable.
|
||||||
|
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"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user