Skip to content

Commit 66f0036

Browse files
committed
Node: Refactor NVM installation
1 parent 962d36d commit 66f0036

File tree

6 files changed

+26
-6
lines changed

6 files changed

+26
-6
lines changed

.dotbot-plugins/git

Submodule git added at 127d21c

.gitmodules

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
[submodule ".dotbot-plugins/sudo"]
2929
path = .dotbot-plugins/sudo
3030
url = https://github.com/johnlettman/dotbot-sudo.git
31-
[submodule "nvm"]
32-
path = nvm
33-
url = https://github.com/nvm-sh/nvm.git
31+
[submodule ".dotbot-plugins/git"]
32+
path = .dotbot-plugins/git
33+
url = https://github.com/DrDynamic/dotbot-git.git

.install.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@
1616
~/.config/htop:
1717
~/.config/less:
1818

19-
~/.nvm:
2019
~/.profile: shell/profile
2120
~/.profile.d: shell/profile.d
2221
~/.functions.d: shell/functions.d
2322

23+
- git:
24+
~/.nvm:
25+
description: Node Version Manager
26+
url: https://github.com/nvm-sh/nvm.git
27+
branch: v0.39.4
28+
method: clone-or-pull
2429

2530

2631
- sudo:

install

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ dotbot_plugins_dir="${repo_dir}/.dotbot-plugins";
88
dotbot_bin="${dotbot_dir}/bin/dotbot";
99

1010
dotbot_plugins=(
11-
"sudo/sudo.py"
1211
"aptget/aptget.py"
12+
"git/git.py"
1313
"snap/snap.py"
14+
"sudo/sudo.py"
1415
);
1516

1617
git -C "${dotbot_dir}" submodule sync --quiet --recursive;

nodejs/nvm

-1
This file was deleted.

shell/profile.d/lang-nodejs

+14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/bin/sh
2+
# shellcheck disable=SC1091
23
export NPM_PACKAGES="${HOME}/.npm-packages";
34

45
append_path "${NPM_PACKAGES}/bin";
56
append_manpath "${NPM_PACKAGES}/share/man";
7+
8+
#
9+
# Node Version Manager
10+
#
11+
export NVM_DIR="${HOME}/.nvm";
12+
13+
if [ -s "${NVM_DIR}/nvm.sh" ]; then
14+
. "${NVM_DIR}/nvm.sh";
15+
fi;
16+
17+
if [ -n "${BASH}" ] && [ -s "${NVM_DIR}/bash_completion" ]; then
18+
. "${NVM_DIR}/bash_completion";
19+
fi;

0 commit comments

Comments
 (0)