#!/bin/sh # dist/: the page, its lexicons, and the OAuth client atlibs stages for --origin (default https://atlibs.socialweb.computer/). set -eu cd "$(dirname "$0")/.." origin=${1:-https://atlibs.socialweb.computer/} rm -rf dist if ! err=$(atlibs stage --target spa --origin "$origin" --out dist records/editor.json 2>&1 >/dev/null); then echo "$err" >&2; exit 1; fi cp -R index.html main.js lib.js example.json lexicons dist/ echo "built dist/ for $origin"