From e591df91f597beb9a5b1f82b40485b8e03b970b4 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Mon, 4 Sep 2017 15:40:27 +0100 Subject: [PATCH 1/3] check for nvm presence before using, survive abscence --- server-ce/bin/install-services | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server-ce/bin/install-services b/server-ce/bin/install-services index 760f0a7edf..38cc89c60c 100644 --- a/server-ce/bin/install-services +++ b/server-ce/bin/install-services @@ -4,12 +4,12 @@ grep 'name:' config/services.js | \ sed 's/.*name: "\(.*\)",/\1/' | \ while read service do - pushd $service && - echo "Installing Service $service" && - echo ' installing Node' && - nvm install && - nvm use && - echo ' installing Dependencies' && + pushd $service + echo "Installing Service $service" + echo ' installing Node' + type nvm && nvm install + type nvm && nvm use + echo ' installing Dependencies' npm install popd done From 2ca8dc903b02a05ae44cbf0bd2a930dc125aa152 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Mon, 4 Sep 2017 15:57:13 +0100 Subject: [PATCH 2/3] Suppress verbose output from `type` command. --- server-ce/bin/install-services | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-ce/bin/install-services b/server-ce/bin/install-services index 38cc89c60c..10ddfe0e43 100644 --- a/server-ce/bin/install-services +++ b/server-ce/bin/install-services @@ -7,8 +7,8 @@ grep 'name:' config/services.js | \ pushd $service echo "Installing Service $service" echo ' installing Node' - type nvm && nvm install - type nvm && nvm use + type -t nvm && nvm install + type -t nvm && nvm use echo ' installing Dependencies' npm install popd From c63753f9f023d19886694cf5811fcdcdf0bc50f4 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Tue, 5 Sep 2017 15:26:40 +0100 Subject: [PATCH 3/3] Add warning when NVM is not present --- server-ce/bin/install-services | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server-ce/bin/install-services b/server-ce/bin/install-services index 10ddfe0e43..662255db06 100644 --- a/server-ce/bin/install-services +++ b/server-ce/bin/install-services @@ -1,5 +1,14 @@ #! env bash +[ -z "`type -t nvm`" ] && cat <