crap/util/generate

17 lines
239 B
Text
Raw Normal View History

#!/usr/bin/env bash
2014-01-29 17:57:22 -08:00
set -e
set -u
pp_include="#include \"$1\""
out="$2"
template="$3"
(cat "$template" | while read -r; do
case "$REPLY" in
'//#INCLUDE') echo "$pp_include" ;;
*) echo -E "$REPLY" ;;
esac
done) > "$out"