From 33d5a71a75c29b4e16961df4d9cd44aad1388bd1 Mon Sep 17 00:00:00 2001 From: Robert Martin-Legene <robert@nic.ar> Date: Mon, 27 May 2019 18:55:02 -0300 Subject: [PATCH] bfaupdate.sh puede utilizar package.json --- bin/bfaupdate.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/bfaupdate.sh b/bin/bfaupdate.sh index 4137623..06b5a17 100755 --- a/bin/bfaupdate.sh +++ b/bin/bfaupdate.sh @@ -6,6 +6,7 @@ # should work. trap "exit 1" ERR +set -o errtrace if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ?" >&2; exit 1; fi source ${BFAHOME}/bin/libbfa.sh || exit 1 @@ -27,7 +28,6 @@ function runasownerof set -x if [ "$1" = "" ] then - cd `dirname $0` # Pulling may update this script itself. # We pull an updated repository, including an updated version of # ourself, and then we execute the updates "us" @@ -36,10 +36,9 @@ then # # To keep things neat, make sure we pull as the user owning the # directory. - runasownerof . git pull + runasownerof ${BFAHOME} git pull exec ./`basename $0` wealreadypulled else - cd ${BFAHOME} runasownerof / apt -y install libclass-accessor-perl - runasownerof . npm rebuild + runasownerof ${BFAHOME} npm rebuild fi -- GitLab