mirror of
https://github.com/andwati/dotfiles.git
synced 2026-10-18 11:02:53 +00:00
Adds a TUI-driven, rollback-capable installer (install/install.sh + install/modules/*.sh) covering JS/Python/systems toolchains, dev tooling, browsers, chat apps, GNOME extras, and misc setup (wakatime key, ssh/gpg perms, apt mirror benchmarking), all sourced from each vendor's official install method. bootstrap.sh stows the zsh/git/tmux/vscode dotfiles and runs the installer; desnap.sh purges snapd and replaces default snaps with apt/Flatpak equivalents.
21 lines
751 B
Bash
21 lines
751 B
Bash
install_nvm() {
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
if [[ -s "$NVM_DIR/nvm.sh" ]]; then
|
|
ok "nvm already installed"
|
|
else
|
|
local version installer
|
|
version=$(curl -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r .tag_name)
|
|
installer=$(mktemp)
|
|
curl -fsSL "https://raw.githubusercontent.com/nvm-sh/nvm/${version}/install.sh" -o "$installer"
|
|
track_new_dir "$NVM_DIR"
|
|
# PROFILE=/dev/null: we manage PATH/init lines ourselves via profile_add below.
|
|
PROFILE=/dev/null bash "$installer"
|
|
rm -f "$installer"
|
|
fi
|
|
|
|
profile_add 'export NVM_DIR="$HOME/.nvm"'
|
|
profile_add '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
|
|
profile_add '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"'
|
|
}
|