Add ? prefix for sample files in file-list; fix bootstrap/upgrade

bootstrap.sh wrote .diachron-version to the temp clone directory
instead of the target project, causing upgrade.sh to fail. Fix that
and teach all three scripts (bootstrap, upgrade, diff-upstream) about
the new ? prefix convention in file-list.

Sample files (?-prefixed) are copied on bootstrap but left alone on
upgrade so user modifications are preserved. New samples introduced
in a newer framework version are still copied if absent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 06:58:09 -05:00
parent f0aca17a0a
commit 5947dcdc86
5 changed files with 78 additions and 16 deletions

View File

@@ -50,12 +50,12 @@ if ! git -C "$cached_repo" rev-parse --verify "$ref^{commit}" >/dev/null 2>&1; t
exit 1
fi
# Read file-list
# Read file-list (strip ? prefix from sample entries)
files=()
while IFS= read -r line; do
[[ "$line" =~ ^[[:space:]]*# ]] && continue
[[ -z "$line" ]] && continue
files+=("$line")
files+=("${line#\?}")
done < "$DIR/file-list"
# Check out upstream into a temp directory