Glavin001 / SMMApp2

Saint Mary's Mobile App, Version 2.0 @
http://society.cs.smu.ca:7000
2 stars 0 forks source link

Bash script for easy installation of dependencies #36

Closed Glavin001 closed 10 years ago

Glavin001 commented 10 years ago

Bash script for easy installation of dependencies. See install.sh script.

#!/bin/bash
if [ "$(uname)" == "Darwin" ]; then
    # Do something under Mac OS X platform        
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
    # Do something under Linux platform
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
    # Do something under Windows NT platform
fi
read -p "Are you sure? " -n 1 -r
echo    # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
    # do dangerous stuff
fi
command -v foo >/dev/null 2>&1 || { echo "I require foo but it's not installed. Aborting." >&2; exit 1; }

For Ubuntu see http://stackoverflow.com/a/1298103/2578205

Glavin001 commented 10 years ago

Usage, simply run:

npm install

And it'll do the rest ;).