18870: git stuff
authorPeter Amstutz <peter.amstutz@curii.com>
Sun, 26 Jun 2022 23:32:52 +0000 (19:32 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Tue, 28 Jun 2022 18:20:35 +0000 (14:20 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

tools/salt-install/installer.sh

index 604bd7e325a528bdfb6dab49ca69083411f60644..37f1baf20ea5e48e1a21125848bd55620c77abd0 100755 (executable)
@@ -77,8 +77,10 @@ case "$subcmd" in
            else
                if ! ssh $NODE test -d arvados-setup ; then
                    ssh $NODE git init --bare arvados-setup.git
            else
                if ! ssh $NODE test -d arvados-setup ; then
                    ssh $NODE git init --bare arvados-setup.git
-                   git remote add $NODE $DEPLOY_USER@$NODE:arvados-setup.git
-                   git push $NODE
+                   if ! git remote add $NODE $DEPLOY_USER@$NODE:arvados-setup.git ; then
+                       git remote set-url $NODE $DEPLOY_USER@$NODE:arvados-setup.git
+                   fi
+                   git push $NODE master
                    ssh $NODE git clone arvados-setup.git arvados-setup
                fi
 
                    ssh $NODE git clone arvados-setup.git arvados-setup
                fi