check permissions
All checks were successful
Update Child Repos / update (push) Successful in 14s

This commit is contained in:
2026-01-02 13:32:05 +01:00
parent ff3dd444c7
commit 342c165e94

View File

@@ -107,7 +107,7 @@ while IFS= read -r clone_url; do
fi
file_diff=$(git diff "${PREVIOUS_COMMIT_ID}" "${CURRENT_COMMIT_ID}" -- "${file}" 2>/dev/null || true)
if [ -n "${file_diff}" ]; then
tmp_current=$(mktemp)
tmp_diff=$(mktemp)
@@ -117,9 +117,11 @@ while IFS= read -r clone_url; do
if patch --dry-run "${tmp_current}" "${tmp_diff}" >/dev/null 2>&1; then
patch "${tmp_current}" "${tmp_diff}" >/dev/null 2>&1
patched_content=$(cat "${tmp_current}")
if [ "${current_content}" != "${patched_content}" ]; then
template_permissions=$(pushd "${TEMPLATE_REPO_DIR}" >/dev/null && stat -c "%a" "${file}" 2>/dev/null || echo "644" && popd >/dev/null)
echo "${patched_content}" > "${file}"
chmod "${template_permissions}" "${file}" 2>/dev/null || true
git add "${file}"
files_changed=true
echo "Merged updates for ${file} in ${repo_name}"
@@ -138,6 +140,8 @@ while IFS= read -r clone_url; do
echo "Adding new file ${file} from template to ${repo_name}"
mkdir -p "$(dirname "${file}")"
echo "${template_content}" > "${file}"
template_permissions=$(pushd "${TEMPLATE_REPO_DIR}" >/dev/null && stat -c "%a" "${file}" 2>/dev/null || echo "644" && popd >/dev/null)
chmod "${template_permissions}" "${file}" 2>/dev/null || true
git add "${file}"
files_changed=true
fi