#!/usr/bin/env bash # Compiles the file in src/broken/ (NOT part of the Maven build) and captures javac's own message. set -uo pipefail cd "$(dirname "$0")/../src/broken" out=../../output/08-compile-errors.txt : > "$out" echo "=== javac NonExhaustiveSwitch.java ===" >> "$out" javac --release 25 -d /tmp/exp23-broken NonExhaustiveSwitch.java 2>&1 | grep -v '^Picked up' >> "$out" cat "$out"