This replaces an earlier Perl version I'd been using for years, but I started thinking, hey, Bash can do all that. It's about ten lines longer than the Perl version, but possibly more readable.
GIST=https://gist.githubusercontent.com/ernstki/982edcfbf93c357bdb09878f7c724389
THING=raw/Makefile_with_built_in_help
(set -x; curl -sL $GIST/$THING || wget -qO- $GIST/$THING) > Makefile