mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
19 lines
240 B
Bash
19 lines
240 B
Bash
|
#!/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
|