Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 38 lines (34 sloc) 1.007 kb
txtrst=$(tput sgr0) # Text reset
txtred=$(tput setaf 1) # Red
txtgrn=$(tput setaf 2) # Green
function check_for {
found=`which $2`
version=`$3 2>&1 | grep -o -E [-0-9.]\{1,\} | head -n 1`
if [ -z "$found" ]; then
echo "${txtred}$1 not found!${txtrst}" >&2
else
echo "$1 version $version found." >&2
if [ -z "$4" ]; then
return
fi
fi
if [ -n "$4" ]; then
if [ "$version" \< "$4" ]; then
echo "${txtred}$1 version $4 or greater required!${txtrst}" >&2
fi
if [ -n "$5" ]; then
if [ "$version" \> "$5" ]; then
echo "${txtred}$1 version $5 or less required!${txtrst}" >&2
fi
fi
else
exit 1
fi
}
check_for Python python 'python -V' 2.6
check_for Node.js node 'node -v' 0.4.6 0.4.8
check_for npm npm "npm -v" 1
check_for mongoDB mongod "mongod --version" 1.4.0
if [[ "$1" == "--vows" ]]; then
check_for Vows vows "vows --version" 0.5.8
fi
Jump to Line
Something went wrong with that request. Please try again.