mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 18:07:51 +08:00
19 lines
249 B
Plaintext
Executable File
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
|