Last active
April 18, 2023 23:51
-
-
Save brettjrea/f4a2ba1a4d2f73c35fc72ef0db679f63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# update and upgrade packages | |
sudo apt update -y && sudo apt upgrade -y | |
# remove unused packages | |
sudo apt autoremove -y | |
sudo apt install git curl procps -y | |
export NVS_HOME="$HOME/.nvs" | |
git clone https://github.com/jasongin/nvs "$NVS_HOME" | |
. "$NVS_HOME/nvs.sh" install | |
echo 'export NVS_HOME="$HOME/.nvs"' >> ~/.bashrc | |
echo '[ -s "$NVS_HOME/nvs.sh" ] && . "$NVS_HOME/nvs.sh" # This loads NVS' >> ~/.bashrc | |
export NVS_HOME="$HOME/.nvs" | |
[ -s "$NVS_HOME/nvs.sh" ] && . "$NVS_HOME/nvs.sh" | |
# install latest version of Node.js might need to use `source nvs.sh` | |
nvs add lts | |
nvs use lts | |
# Add NVS and Node to the PATH environment variable | |
echo 'export NVS_HOME="$HOME/.nvs"' >> ~/.bashrc | |
echo '[ -s "$NVS_HOME/nvs.sh" ] && . "$NVS_HOME/nvs.sh" # This loads NVS' >> ~/.bashrc | |
echo 'export PATH="$NVS_HOME/$(nvs which latest)":$PATH' >> ~/.bashrc | |
# Reload the shell to apply the PATH changes | |
exec bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment