Recently Written · git

recentlywritten

my writings (done recently)

git clone https://github.com/equwal/recentlywritten

Log | Files | Refs


commit adfeebb2bca27fb504441538957ab4ff1712b9ff
Spenser Truex <truex@equwal.com>
2026-09-20 22:10:52 -0700

Keep static/book/ out of the build.sh rsync delete

The book files exist only on the server. The rsync --delete step
would remove them and break the links in books.html.
Exclude /static/book/ so rsync leaves the directory alone.

 build.sh | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/build.sh b/build.sh
index 89915d3..09cf1be 100755
--- a/build.sh
+++ b/build.sh
@@ -217,8 +217,11 @@ echo "  posts: $(wc -l < "$WORK/posts.tsv" | tr -d ' ')   pages: $(wc -l < "$WOR
 # git/ and git.html share this web root but are published by deploy-git.sh,
 # not built here. Excluding them keeps --delete from treating them as stale:
 # rsync never deletes an excluded path on the receiving side.
+# static/book/ holds book files that stay out of the repo (see .gitignore).
+# They exist only on the server, so the same rule protects them.
 if [ "$DEPLOY" = yes ]; then
     rsync -avzP --delete --exclude=/git/ --exclude=/git.html \
+        --exclude=/static/book/ \
         "$SITE_DIR/" "$DEPLOY_HOST:$DEPLOY_PATH"
     ssh "$DEPLOY_HOST" "chmod -R a+rX $DEPLOY_PATH"
 fi