Commit 86f24010 authored by Aral Balkan's avatar Aral Balkan
Browse files

Merge branch 'fix_install' into 'master'

Fix install script

* Use https Git repo URLs
* Use `hash` instead of `which` (see http://stackoverflow.com/a/677212/207619)

See merge request !1
parents 8a2278e7 81afa13b
......@@ -28,9 +28,8 @@ if [ ! -z "$(git status --porcelain)" ] || [ ! -z "$(git status | grep 'git push
exit 64
fi
#
# -f option: Force reinstall all node_modules (including live modules) from scratch.
#
while getopts ":f" opt; do
case $opt in
f)
......@@ -48,21 +47,19 @@ done
#
# Make sure nodemon is installed.
#
which nodemon
if [ ! $? -eq 0 ]; then
npm install -g nodemon
else
if hash nodemon 2>/dev/null; then
echo "Global module nodemon already installed, skipped installation.\n"
else
npm install -g nodemon
fi
#
# Make sure n is installed.
#
which n
if [ ! $? -eq 0 ]; then
npm install -g n
else
if hash n 2>/dev/null; then
echo "Global module n already installed, skipped installation.\n"
else
npm install -g n
fi
# Set Node version to the latest stable version.
......@@ -78,8 +75,6 @@ n 0.12.0
# and easier to iterate on in situ than using npm.)
#
# TODO: Change git@ URLs to https://
if [ -d node_modules ]; then
#
......@@ -121,7 +116,7 @@ if [ -d node_modules ]; then
# Live module does not exist: clone it
#
echo "Indie Set live module does not exist. Cloning…\n"
git clone git@source.ind.ie:project/set.git node_modules/indie-set
git clone https://source.ind.ie/project/set.git node_modules/indie-set
cd node_modules/indie-set
./install
cd ../..
......@@ -137,13 +132,13 @@ else
#
echo "Indie Pulse Node live module does not exist. Cloning…\n"
git clone git@source.ind.ie:project/pulse-node.git node_modules/pulse-node
git clone https://source.ind.ie/project/pulse-node.git node_modules/pulse-node
cd node_modules/pulse-node/
./install
cd ../..
echo "Indie Set live module does not exist. Cloning…\n"
git clone git@source.ind.ie:project/set.git node_modules/indie-set
git clone https://source.ind.ie/project/set.git node_modules/indie-set
cd node_modules/indie-set
./install
cd ../..
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment