This commit is contained in:
2024-12-25 08:54:27 +01:00
parent 4a50de92e3
commit 01ca5897db
3 changed files with 82 additions and 11 deletions

25
install_herolib.vsh Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env -S v -n -w -gc none -no-retry-compilation -cc tcc -d use_openssl -enable-globals run
import os
import flag
vroot := @VROOT
abs_dir_of_script := dir(@FILE)
// Reset symlinks if requested
println('Resetting all symlinks...')
os.rmdir_all('${os.home_dir()}/.vmodules/freeflowuniverse/herolib') or {}
os.rm('${os.home_dir()}/.vmodules/freeflowuniverse/herolib') or {}
os.rmdir_all('${os.home_dir()}/.vmodules/vlang/testing') or {}
// Create necessary directories
os.mkdir_all('${os.home_dir()}/.vmodules/freeflowuniverse') or {
panic('Failed to create directory ~/.vmodules/freeflowuniverse: ${err}')
}
// Create new symlinks
os.symlink('${abs_dir_of_script}/herolib', '${os.home_dir()}/.vmodules/freeflowuniverse/herolib') or {
panic('Failed to create herolib symlink: ${err}')
}
println('Herolib installation completed successfully!')