#!/bin/sh
# https://causal.agency/bin/c.html
set -eu
temp=$(mktemp -d)
trap 'rm -r "${temp}"' EXIT
exec 3>>"${temp}/run.c"
cat >&3 <
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
EOF
expr=
type=
while getopts 'e:i:t' opt; do
case "${opt}" in
(e) expr=$OPTARG;;
(i) echo "#include <${OPTARG}>" >&3;;
(t) type=1;;
(?) exit 1;;
esac
done
shift $((OPTIND - 1))
cat >&3 <&3 <&3 <&3
fi
echo '}' >&3
cat >"${temp}/Makefile" <