elvish/eval/builtin_modules.bash

19 lines
240 B
Bash
Raw Normal View History

#!/bin/bash
out=./builtin_modules.go
{
echo "package eval"
echo "var builtinModules = map[string]string{"
for f in *.elv; do
echo -n "\"${f%.elv}\": \`"
cat $f | sed 's/`/``/g'
echo '`,'
done
echo "}"
} > $out
gofmt -w $out