#!/usr/bin/env elvish out = ./bundled_modules.go { echo "package eval" echo "var bundledModules = map[string]string{" for f [*.elv] { print '"'$f[:-4]'": `' cat $f | sed 's/`/`+"`"+`/g' echo '`,' } echo "}" } > $out gofmt -w $out