mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-28 17:38:04 -08:00
The repositories moved from Neo-Desktop to the D-Modem GitHub organisation: D-Modem-RE is now D-Modem/D-Modem, pico-serial is D-Modem/hardware, modemmenu (PBX-Modem) is D-Modem/menu, bbs-sec is D-Modem/bbs and go3270-sec is D-Modem/go3270. Update links, module paths, submodule URLs and source-location strings to match. Copyright notices still name Neo-Desktop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRUwD2JJ5d6fgHmpVTw
32 lines
1016 B
Bash
Executable File
32 lines
1016 B
Bash
Executable File
#!/bin/sh
|
|
# publish.sh: copy docs/wiki to the repository's GitHub wiki.
|
|
#
|
|
# The wiki must be on (Settings > Features > Wikis) and have a page already:
|
|
# GitHub makes the wiki's repository when its first page is saved, so make
|
|
# any page in the web editor once. Then, from the repository:
|
|
#
|
|
# docs/wiki/publish.sh
|
|
#
|
|
# with push access to D-Modem/bbs (SSH or HTTPS credentials).
|
|
set -eu
|
|
|
|
here=$(cd "$(dirname "$0")" && pwd)
|
|
url=${WIKI_URL:-$(git -C "$here" remote get-url origin | sed 's/\.git$//').wiki.git}
|
|
tmp=$(mktemp -d)
|
|
trap 'rm -rf "$tmp"' EXIT
|
|
|
|
git clone --quiet --depth 1 "$url" "$tmp/wiki"
|
|
# the wiki is this directory's pages, no more and no less
|
|
find "$tmp/wiki" -mindepth 1 -maxdepth 1 -name '*.md' -delete
|
|
cp "$here"/*.md "$tmp/wiki/"
|
|
cd "$tmp/wiki"
|
|
git add -A
|
|
if git diff --cached --quiet; then
|
|
echo "the wiki is up to date"
|
|
exit 0
|
|
fi
|
|
rev=$(git -C "$here" rev-parse --short HEAD)
|
|
git commit --quiet -m "From docs/wiki at $rev"
|
|
git push --quiet origin HEAD
|
|
echo "published docs/wiki ($rev) to $url"
|