#!/usr/bin/env bash # Regenerates every file in output/. Needs JDK 25 and Maven; the first run must be online. set -euo pipefail cd "$(dirname "$0")/.." rm -f output/*.txt # 01: the single-file console version (the copy attached to the article lives in the WordPress media library) mkdir -p /tmp/lm && cp scripts/demo-input.txt /tmp/lm/ echo "01 console (structured) ..." mvn -B -q -DskipTests compile java -cp target/classes com.ankurm.library.console.ConsoleApp < scripts/demo-input.txt 2>/dev/null > output/01-console-structured.txt # 02-06: written by the tests themselves, so each file is also an assertion echo "02-06 tests ..." mvn -B -q test # 07: the real server, driven with curl echo "07 curl demo ..." scripts/run.sh --detach scripts/api-demo.sh > output/07-curl-demo.txt scripts/stop.sh # 08: the Boot default we override echo "08 open-in-view warning ..." scripts/open-in-view-warning.sh > output/08-open-in-view-warning.txt # 09: the SQL one borrow produces echo "09 borrow SQL ..." scripts/sql-trace.sh > output/09-borrow-sql.txt ls output