forked from donnemartin/dev-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.sh
executable file
·49 lines (37 loc) · 1.18 KB
/
web.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
# Install command-line tools using Homebrew.
# Ask for the administrator password upfront.
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Make sure we’re using the latest Homebrew.
brew update
# brew install node
fancy_echo() {
local fmt="$1"; shift
# shellcheck disable=SC2059
printf "\\n$fmt\\n" "$@"
}
fancy_echo "Installing nvm..."
# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
fancy_echo "nvm installed!"
fancy_echo "Installing latest node..."
nvm install node
fancy_echo "node installed!"
nvm alias default node
fancy_echo "Installing Yarn..."
brew install yarn --without-node
fancy_echo "Yarn installed!"
# Remove outdated versions from the cellar.
brew cleanup
# npm install -g coffee-script
# npm install -g grunt-cli
# npm install -g jshint
# npm install -g less
#gem install jekyll