merlin/bin/nodeenv.sh
Paul Karikh 05451e3e59 Add karma testing
This patch adds configuration for Karma.

Change-Id: Ibb65060836f967ac81a57ea279d7fa494e238d49
Implements blueprint: merlin-unittests
2015-04-17 15:27:11 +03:00

23 lines
359 B
Bash

#!/bin/bash
set -e
# This script checks if node is installed in the current path,
# and if not, will install the version specified. using nodeenv -p
#
#command -v node && echo "ok"
ENVDIR="$1"
VERSION="$2"
if [[ $(command -v node) ]]
then
exit
fi
if [[ -n "$VERSION" ]]
then
nodeenv -p "$ENVDIR" --node="$VERSION"
else
nodeenv -p "$ENVDIR"
fi