ref: 2223d5f76881d3edce15c6a23e83f82cb04fcdd5
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