From 98b544842200761b3821957628520d63ca220e8e Mon Sep 17 00:00:00 2001 From: Robert Martin-Legene <robert@nic.ar> Date: Fri, 24 May 2019 21:59:16 -0300 Subject: [PATCH] Less noise (and a bugfix) --- bin/installbfa.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/bin/installbfa.sh b/bin/installbfa.sh index 7f61f33..b7cd4cf 100755 --- a/bin/installbfa.sh +++ b/bin/installbfa.sh @@ -38,8 +38,10 @@ function runasownerof fi unset path ${precmd} "$@" + rv=$? popd > /dev/null unset precmd + return $rv } # For getting a recent nodejs @@ -62,25 +64,22 @@ function nodejsinstall fi # nodejs also provides npm aptinstall nodejs -} - -function web3install -{ + # init npm test -r ~bfa/package.json || info "Initialising nodejs." && runasownerof ~bfa npm init -y # nodejs package(s) that we need. - if ! runasownerof ~bfa npm ls require + if ! runasownerof ~bfa npm ls require > /dev/null then info "Installing nodejs module: require" runasownerof ~bfa npm install require fi - if ! runasownerof ~bfa npm ls request + if ! runasownerof ~bfa npm ls request > /dev/null then info "Installing nodejs module: request" runasownerof ~bfa npm install request fi - if ! runasownerof ~bfa npm ls web3 + if ! runasownerof ~bfa npm ls web3 > /dev/null then info "Installing nodejs module: web3 (will show many warnings)" runasownerof ~bfa npm install web3 @@ -261,7 +260,6 @@ aptinstall dirmngr apt-transport-https curl git curl build-essential sudo aptinstall jq libjson-perl libwww-perl libclass-accessor-perl userconfig nodejsinstall -web3install golanginstall gethinstall cronit -- GitLab