mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parent
de182d5809
commit
54c382f6f1
@ -36,20 +36,30 @@ fn main() {
|
||||
}
|
||||
|
||||
$if windows {
|
||||
v_backup_file := 'v_old.exe'
|
||||
if os.exists(v_backup_file) {
|
||||
os.rm(v_backup_file)
|
||||
}
|
||||
os.mv('v.exe', v_backup_file)
|
||||
backup('v.exe')
|
||||
|
||||
make_result := os.exec('make.bat') or {
|
||||
panic(err)
|
||||
}
|
||||
println(make_result.output)
|
||||
|
||||
backup('cmd/tools/vup.exe')
|
||||
} $else {
|
||||
make_result := os.exec('make') or {
|
||||
panic(err)
|
||||
}
|
||||
println(make_result.output)
|
||||
}
|
||||
|
||||
_ := os.exec('v cmd/tools/vup') or {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
fn backup(file string) {
|
||||
backup_file := '${file}_old.exe'
|
||||
if os.exists(backup_file) {
|
||||
os.rm(backup_file)
|
||||
}
|
||||
os.mv(file, backup_file)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user