bin: add sync script for lotus-land-story
Assisted-by: Claude Opus 5 via Claude Code
diff --git a/bin/sync b/bin/sync
new file mode 100755
index 0000000..1fc70f1
--- /dev/null
+++ b/bin/sync
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+if [[ "${TRACE-0}" == "1" ]]; then
+ set -o xtrace
+fi
+
+readonly HOST="${GISTS_HOST:-lotus-land-story}"
+readonly DEST="${GISTS_DEST:-/mnt/lotus-land-story/caddy/data/gists}"
+
+main() {
+ local root
+ root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
+
+ rsync \
+ --archive \
+ --compress \
+ --itemize-changes \
+ --include='*.html' \
+ --include='*.md' \
+ --exclude='*' \
+ "$@" \
+ "$root/" "$HOST:$DEST/"
+}
+
+main "$@"