From 8a5593363d85492e98acb253c3c896b346ed7a65 Mon Sep 17 00:00:00 2001 From: richdex14 Date: Sat, 2 Sep 2017 12:05:22 -0600 Subject: [PATCH] Update setup.bash to work with portable `head` command. --- setup.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.bash b/setup.bash index bca828d..d86f9fb 100644 --- a/setup.bash +++ b/setup.bash @@ -241,10 +241,10 @@ fi if [ -z "$NODEJS_VER" ]; then if [ -n "$(type -p curl)" ]; then - NODEJS_VER=$(curl -fsL "$NODEJS_BASE_URL/dist/index.tab" | head -2 | tail -1 | cut -f 1) \ + NODEJS_VER=$(curl -fsL "$NODEJS_BASE_URL/dist/index.tab" | head -n 2 | tail -1 | cut -f 1) \ || echo 'error automatically determining current node.js version' elif [ -n "$(type -p wget)" ]; then - NODEJS_VER=$(wget --quiet "$NODEJS_BASE_URL/dist/index.tab" -O - | head -2 | tail -1 | cut -f 1) \ + NODEJS_VER=$(wget --quiet "$NODEJS_BASE_URL/dist/index.tab" -O - | head -n 2 | tail -1 | cut -f 1) \ || echo 'error automatically determining current node.js version' else echo "Found neither 'curl' nor 'wget'. Can't Continue."