#!/bin/bash

TEST_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LIB_DIR="${TEST_DIR}/lib"
MODULES_DIR="$(readlink -f "${TEST_DIR}/../node_modules")"

mkdir -p "${LIB_DIR}"
mkdir -p "${MODULES_DIR}"

if [[ ! -a "${LIB_DIR}/mocha.js" ]]; then
    wget https://raw.githubusercontent.com/visionmedia/mocha/master/mocha.js \
    -O "${LIB_DIR}/mocha.js" -q
fi

if [[ ! -a "${LIB_DIR}/mocha.css" ]]; then
    wget https://raw.githubusercontent.com/visionmedia/mocha/master/mocha.css \
    -O "${LIB_DIR}/mocha.css" -q
fi
