Translator from shell to V scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
321 B

module main
import os
fn main() {
sh_filename := os.args[1]
vsh_filename := sh_filename.replace('.sh', '').replace('.shell', '').replace('.bash', '') +
'.vsh'
sh := os.read_lines(sh_filename) ?
vsh := translate(sh)
mut file := os.open_file(vsh_filename, 'w+') ?
file.writeln(vsh.join('\n')) ?
file.close()
}