elvish/eval/bundle-modules
2017-09-21 02:10:09 +01:00

19 lines
249 B
Plaintext
Executable File

#!/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