16 lines
724 B
Bash
Executable File
16 lines
724 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Local dev: put the content repo's files where the build expects them.
|
|
# Usage: ./scripts/link-content.sh [path-to-content-clone] (default ../ctao-content)
|
|
# Copies (not symlinks) so the dev tree behaves exactly like the machine
|
|
# build overlay; re-run after pulling content changes.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
src="${1:-../ctao-content}"
|
|
[ -d "$src/news" ] || { echo "content clone not found at $src (git clone <gitea>/ctao/content.git first)"; exit 1; }
|
|
rm -rf src/content/news src/content/pages public/uploads
|
|
mkdir -p src/content public
|
|
cp -a "$src/news" src/content/news
|
|
cp -a "$src/pages" src/content/pages
|
|
cp -a "$src/uploads" public/uploads
|
|
echo "content linked from $src"
|