diff --git a/README.md b/README.md index 6ef3ec78..003ddd46 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ bash /tmp/install_v.sh --analyzer --herolib #do not forget to do the following this makes sure vtest and vrun exists cd ~/code/github/freeflowuniverse/herolib -bash install_herolib.vsh +v install_herolib.vsh # IMPORTANT: Start a new shell after installation for paths to be set correctly diff --git a/install_herolib.vsh b/install_herolib.vsh index 4148a0e2..30ffa9ee 100755 --- a/install_herolib.vsh +++ b/install_herolib.vsh @@ -5,11 +5,11 @@ import flag fn addtoscript(tofind string, toadd string) ! { home_dir := os.home_dir() - mut rc_file := '${home_dir}/.zshrc' + mut rc_file := '${home_dir}/.zprofile' if !os.exists(rc_file) { rc_file = '${home_dir}/.bashrc' if !os.exists(rc_file) { - return error('No .zshrc or .bashrc found in home directory') + return error('No .zprofile or .bashrc found in home directory') } } @@ -65,15 +65,18 @@ println('Herolib installation completed successfully!') // Add vtest alias addtoscript('alias vtest=', "alias vtest='v -stats -enable-globals -show-c-output -n -w -cg -gc none -cc tcc test' ") or { eprintln('Failed to add vtest alias: ${err}') + exit(1) } // Add vrun alias addtoscript('alias vrun=', "alias vrun='v -stats -enable-globals -show-c-output -n -w -cg -gc none -cc tcc run' ") or { eprintln('Failed to add vrun alias: ${err}') + exit(1) } addtoscript('HOME/hero/bin', 'export PATH="\$PATH:\$HOME/hero/bin"') or { eprintln('Failed to add path to hero, ${err}') + exit(1) } // ulimit -n 32000