ref: 6a7ced303236cfa98b216834f197b6dab30ded4f
dir: /amalg.sh/
# Amalgamate the source code, sqlite3 style. set -eu echo "/*" echo " ----------------------------------------------------------------" echo " | This file is a generated redistributable version of minipeg. |" echo " | See https://ach.srht.site/minipeg/ for more information. |" echo " ----------------------------------------------------------------" sed 's/^/ /g' LICENSE echo "" echo "*/" ( for f in "$@" do case "$f" in *.c) cat "$f" ;; esac done ) | grep '^#include <' | sort -u for f in "$@" do echo "#line 0 \"$f\"" grep -v '^#include' "$f" done