From 34c0198ef63584d816d07f038707ec6153ea62e7 Mon Sep 17 00:00:00 2001 From: Robert Martin-Legene <robert@martin-legene.dk> Date: Mon, 1 Apr 2019 02:16:42 -0300 Subject: [PATCH] Arreglando permisos en ~bfa --- bin/installbfa.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/installbfa.sh b/bin/installbfa.sh index 1a28d63..8387c85 100755 --- a/bin/installbfa.sh +++ b/bin/installbfa.sh @@ -146,15 +146,20 @@ function usersetup info Adding required user \"bfa\" adduser --disabled-password --gecos 'Blockchain Federal Argentina' bfa fi - cd ~bfa + # If we're running inside a docker, this may already exist but + # probably owned by root. Let's make sure things are proper. + chown -R bfa:bfa ~bfa # cloning if not done already if [ ! -d ~bfa/bfa ] then + # initial cloning + cd ~bfa git clone https://gitlab.bfa.ar/blockchain/nucleo.git bfa + else + # updating + cd ~bfa/bfa + git pull fi - # updating - cd ~bfa/bfa - git pull # cd ~bfa if [ $( expand < .bashrc | grep -E 'source .*bfa/bin/env' | wc -l ) -eq 0 ] @@ -182,6 +187,7 @@ function welcome # Ubuntu necesita mas repos grep -q Ubuntu /etc/issue && apt-add-repository multiverse +# apt update # development tools aptinstall dirmngr apt-transport-https curl git curl build-essential sudo -- GitLab