commit 3f5ff3b6b68fd955e45e21d3c51a4a303fe8e8e0
parent ce964816ea62485c45fa629220c6b8a3033f42aa
Author: Henry Unite <unitehenry@gmail.com>
Date: Sat, 28 Nov 2026 19:41:58 +0000
feat(stagit): show bundle clone instructions on repository pages
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/scripts/stagit b/scripts/stagit
@@ -162,6 +162,10 @@ for repo_dir in "${repo_dirs[@]}"; do
# Bundle all branches and tags so the repository can be downloaded.
git --git-dir="$repo_dir" bundle create -q repo.bundle HEAD --branches --tags
+ # Replace stagit's clone row with bundle download/clone instructions.
+ clone_row="<tr class=\"url\"><td></td><td>Download <a href=\"$BASE_URL/$name/repo.bundle\">repo.bundle</a>, then run <code>git clone repo.bundle $name</code></td></tr>"
+ find . -type f -name '*.html' -exec sed -i -E "s#<tr class=\"url\">.*</tr>#$clone_row#" {} +
+
# Assets are copied rather than symlinked so the build artifact works on
# hosts that do not preserve symlinks.
cp "$ASSET_DIR/style.css" "$ASSET_DIR/logo.png" "$ASSET_DIR/favicon.png" .