ref: e41229f96b0f353af98e8f05134a1564e4a9ff16
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