#!/usr/bin/env bash # Regenerates every file in output/. 06 (timings) drifts between runs: the figures are indicative. set -euo pipefail cd "$(dirname "$0")/.." mvn -q -B compile mkdir -p output run() { java -Dstdout.encoding=UTF-8 -cp target/classes "com.ankurm.random.$1" 2>&1 | grep -v -e '^Picked up JAVA_TOOL_OPTIONS' -e '^Picked up _JAVA_OPTIONS' > "output/$2.txt"; } run SeedDemo 01-seeds-and-predictability run RangeDemo 02-ranges-and-bias run ThreadLocalDemo 03-threadlocalrandom run SecureRandomDemo 04-securerandom run RandomGeneratorDemo 05-randomgenerator run BenchmarkDemo 06-timings mvn -B test 2>&1 | grep -E 'Tests run|BUILD|ERROR|FAIL' | grep -v 'Picked up' > output/07-tests.txt echo "regenerated:"; ls output