forked from Aghassi/CWRUSwingClub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installDependencies
executable file
·60 lines (45 loc) · 1.75 KB
/
installDependencies
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
50
51
52
53
54
55
56
57
58
59
if [[ "$OSTYPE" == "linux"* ]]; then
echo 'installing npm if you do not have it already'
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
echo 'installing grunt'
sudo npm install -g grunt-cli
echo 'install bower'
sudo npm install -g bower
echo "PLEASE RUN 'npm install' AND 'bower install' NOW IN THE PROJECT DIRECTORY" echo "PLEASE RUN 'npm install' NOW"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
echo 'installing npm if you do not have it already'
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo 'install npm'
# using Homebrew
# Note: `brew install npm` has problems, as of 2010-12-30.
# hopefully it will eventually be good and happy.
# As of npm@0.2.13, however, this is an option
PREFIX=$(brew --prefix)
# take ownership
# this will also let homebrew work without using sudo
# please don't do this if you don't know what it does!
sudo mkdir -p $PREFIX/{share/man,bin,lib/node,include/node}
sudo chown -R $USER $PREFIX/{share/man,bin,lib/node,include/node}
brew install node
# now install npm
# prefix will default to $(brew --prefix)
curl -0 -L https://www.npmjs.org/install.sh
sudo sh install.sh
rm install.sh
echo 'installing grunt'
sudo npm install -g grunt-cli
echo 'install bower'
sudo npm install -g bower
echo "PLEASE RUN 'npm install' AND 'bower install' NOW IN THE PROJECT DIRECTORY"
else
echo 'Windows can not do this. Read the README'
fi