From a40b71b1b1ad6706d2abbd68f2c30ae0c0e34fd0 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 22 Apr 2015 09:46:54 -0600 Subject: [PATCH] default to current version --- setup.bash | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setup.bash b/setup.bash index bd9e083..a29af98 100644 --- a/setup.bash +++ b/setup.bash @@ -212,7 +212,16 @@ if [ -f "/tmp/IOJS_VER" ]; then fi if [ -z "$IOJS_VER" ]; then - IOJS_VER="v1.5.1" + if [ -n "$(which curl)" ]; then + IOJS_VER="$(curl -fsSL https://iojs.org/dist/index.tab | head -2 | tail -1 | cut -f 1)" \ + || echo 'error downloading os setup script' + elif [ -n "$(which wget)" ]; then + IOJS_VER="wget --quiet https://iojs.org/dist/index.tab | head -2 | tail -1 | cut -f 1)" \ + || echo 'error downloading os setup script' + else + echo "Found neither 'curl' nor 'wget'. Can't Continue." + exit 1 + fi fi #