sync-wiki.sh mirrors policing + corrections instead of justice; the aggregate Wiki index and the per-layer folders reflect the six-layer suite (Core - Contraband - Policing - Corrections - Gangs - Ward) and the reserved Judiciary seam. Assemblies re-vendored with the fresh module DLLs.
43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Consolidate every layer's Wiki/ into THIS repo's Wiki/, so the Institution page is the single place
|
|
# to read the whole suite's documentation. Each layer's pages land under Wiki/<layer>/ with their own
|
|
# internal links intact. The layer repos stay the canonical source (each ships its own wiki for a
|
|
# standalone install); re-run this whenever a layer's wiki changes to re-sync the aggregated copy.
|
|
#
|
|
# Wiki/Home.md (the suite index) is hand-written and lives at the top level -- this script never
|
|
# touches it, only the per-layer subfolders.
|
|
#
|
|
# Usage: Tools/sync-wiki.sh (assumes siblings at ../rimworld-<name>)
|
|
set -euo pipefail
|
|
|
|
HERE="$(cd "$(dirname "$0")/.." && pwd)"
|
|
SIB="$(dirname "$HERE")"
|
|
|
|
# layer folder -> sibling repo
|
|
LAYERS=(
|
|
"core:rimworld-core"
|
|
"contraband:rimworld-contraband"
|
|
"policing:rimworld-policing"
|
|
"corrections:rimworld-corrections"
|
|
"gangs:rimworld-gangs"
|
|
"ward:rimworld-ward"
|
|
)
|
|
|
|
echo "==> mirroring layer wikis into $HERE/Wiki/"
|
|
for entry in "${LAYERS[@]}"; do
|
|
layer="${entry%%:*}"
|
|
repo="${entry##*:}"
|
|
src="$SIB/$repo/Wiki"
|
|
dst="$HERE/Wiki/$layer"
|
|
if [[ -d "$src" ]]; then
|
|
rm -rf "$dst"
|
|
mkdir -p "$dst"
|
|
cp "$src"/*.md "$dst"/
|
|
echo " $layer: $(ls "$dst" | wc -l | tr -d ' ') pages"
|
|
else
|
|
echo " $layer: no Wiki/ in $repo -- skipped"
|
|
fi
|
|
done
|
|
|
|
echo "==> done. The Institution wiki now mirrors every layer under Wiki/<layer>/; Wiki/Home.md is the index."
|