cmd/tools: enable c2v

master
Alexander Medvednikov 2022-06-22 22:10:46 +03:00
parent e6c3de2f46
commit c9ab086029
1 changed files with 3 additions and 3 deletions

View File

@ -7,15 +7,15 @@ import v.util
fn main() { fn main() {
vmodules := os.vmodules_dir() vmodules := os.vmodules_dir()
c2v_dir := os.join_path(vmodules, 'c2v_alpha') c2v_dir := os.join_path(vmodules, 'c2v')
c2v_bin := os.join_path(c2v_dir, 'c2v') c2v_bin := os.join_path(c2v_dir, 'c2v')
// Git clone c2v // Git clone c2v
if !os.exists(c2v_dir) { if !os.exists(c2v_dir) {
println('C2V is not installed. Cloning C2V to $c2v_dir ...') println('C2V is not installed. Cloning C2V to $c2v_dir ...')
os.chdir(vmodules)? os.chdir(vmodules)?
res := os.execute('git clone --depth 1 git@github.com:/vlang/c2v_alpha.git') res := os.execute('git clone --depth 1 git@github.com:/vlang/c2v.git')
if res.exit_code != 0 { if res.exit_code != 0 {
eprintln('Failed to download C2V. Perhaps it is not released yet? Is it June 20 yet?') eprintln('Failed to download C2V.')
exit(1) exit(1)
} }
} }