tools: fix `v symlink`, `uname -o` doesn't exist on macOS (#10303)
parent
b0bafa6376
commit
89d2f508cc
|
@ -24,7 +24,7 @@ fn cleanup_vtmp_folder() {
|
||||||
|
|
||||||
fn setup_symlink_unix(vexe string) {
|
fn setup_symlink_unix(vexe string) {
|
||||||
mut link_path := '/data/data/com.termux/files/usr/bin/v'
|
mut link_path := '/data/data/com.termux/files/usr/bin/v'
|
||||||
if os.system("uname -o | grep -q '[A/a]ndroid'") == 1 {
|
if !os.is_dir('/data/data/com.termux/files') {
|
||||||
link_dir := '/usr/local/bin'
|
link_dir := '/usr/local/bin'
|
||||||
if !os.exists(link_dir) {
|
if !os.exists(link_dir) {
|
||||||
os.mkdir_all(link_dir) or { panic(err) }
|
os.mkdir_all(link_dir) or { panic(err) }
|
||||||
|
|
Loading…
Reference in New Issue