mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
symlink: create /usr/local/bin if it does not exist (#6621)
This commit is contained in:
parent
eab0974e7d
commit
7471e1fd05
@ -17,7 +17,11 @@ fn main() {
|
||||
}
|
||||
|
||||
fn setup_symlink(vexe string) {
|
||||
mut link_path := '/usr/local/bin/v'
|
||||
link_dir := '/usr/local/bin'
|
||||
if !os.exists(link_dir) {
|
||||
os.mkdir_all(link_dir)
|
||||
}
|
||||
mut link_path := link_dir + '/v'
|
||||
mut ret := os.exec('ln -sf $vexe $link_path') or {
|
||||
panic(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user