05451e3e59
This patch adds configuration for Karma. Change-Id: Ibb65060836f967ac81a57ea279d7fa494e238d49 Implements blueprint: merlin-unittests
23 lines
359 B
Bash
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
|