-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·33 lines (29 loc) · 958 Bytes
/
install.sh
File metadata and controls
executable file
·33 lines (29 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# Install NVM and then Node
if [ ! -d "$NVM_DIR" ]; then
# Install manually: https://github.com/creationix/nvm#manual-install
echo "› Installing nvm (Node Version Manager)"
export NVM_DIR="$HOME/.nvm" && (
git clone https://github.com/creationix/nvm.git "$NVM_DIR"
cd "$NVM_DIR"
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
) && \. "$NVM_DIR/nvm.sh"
echo " Installing latest Node LTS as default"
nvm install --lts
else
echo "› Upgrading NVM (Node Version Manager)"
# Upgrade manually: https://github.com/creationix/nvm#manual-upgrade
(
cd "$NVM_DIR"
git fetch --tags origin
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
) && \. "$NVM_DIR/nvm.sh"
fi
# https://www.npmjs.com/package/spoof
if test ! $(which spoof)
then
if test $(which npm)
then
sudo npm install spoof -g
fi
fi