mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v symlink
This commit is contained in:
@ -122,6 +122,10 @@ fn main() {
|
||||
println('use `v install` to install modules from vpm.vlang.io')
|
||||
return
|
||||
}
|
||||
if 'symlink' in args {
|
||||
create_symlink()
|
||||
return
|
||||
}
|
||||
if args.join(' ').contains(' test v') {
|
||||
test_v()
|
||||
return
|
||||
@ -934,3 +938,10 @@ fn test_v() {
|
||||
}
|
||||
}
|
||||
|
||||
fn create_symlink() {
|
||||
vexe := os.executable()
|
||||
link_path := '/usr/local/bin/v'
|
||||
os.system('ln -sf $vexe $link_path')
|
||||
println('symlink "$link_path" has been created')
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user