Skip to content

Commit

Permalink
Relax constraint on nodejs 6.2.2 -> 6.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Peaker committed Jun 22, 2016
1 parent 67272ac commit b9c2e6a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
# adapted from https://apple.stackexchange.com/a/123408/11374
function version { echo "${@//v}" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }

NODE_VERSION_STRING=`node --version`
NODE_VERSION=$(version $NODE_VERSION_STRING)
NODE_VERSION=`node --version`

if [ "$NODE_VERSION" -ge $(version "v6.2.2") ]; then
echo "Using existing system node $NODE_VERSION_STRING"
if [ $(version "$NODE_VERSION") -ge $(version "v6.2.1") ]; then
echo "Using existing system node $NODE_VERSION"
cp `which node` node/node
else
echo "Building nodejs from source"
Expand Down

0 comments on commit b9c2e6a

Please sign in to comment.