MassLNC additions collab/tsbere/buildvms
authorThomas Berezansky <tsbere@mvlc.org>
Wed, 4 Nov 2015 21:46:37 +0000 (16:46 -0500)
committerThomas Berezansky <tsbere@mvlc.org>
Wed, 4 Nov 2015 21:46:37 +0000 (16:46 -0500)
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
setupvm

diff --git a/setupvm b/setupvm
index 49ccc5f..76db69a 100755 (executable)
--- a/setupvm
+++ b/setupvm
@@ -28,6 +28,9 @@ fi
 if [ "$EGVMOPENSRFWORKING" = "" ]; then
     EGVMMISSINGCONFIG="EGVMOPENSRFWORKING $EGVMMISSINGCONFIG"
 fi
+if [ "$EGVMMLNCMAIN" = "" ]; then
+    EGVMMISSINGCONFIG="EGVMMLNCMAIN $EGVMMISSINGCONFIG"
+fi
 if [ "$EGVMPGPASS" = "" ]; then
     EGVMMISSINGCONFIG="EGVMPGPASS $EGVMMISSINGCONFIG"
 fi
@@ -97,6 +100,8 @@ fi
 # Add mainrepo remotes, but don't bother fetching (if we need them later we will fetch)
 cd working/$EGVMNAME/Evergreen
 git remote add mainrepo $EGVMEVERGREENMAIN
+# MassLNC Repo
+git remote add masslnc $EGVMMLNCMAIN
 cd ../OpenSRF
 git remote add mainrepo $EGVMOPENSRFMAIN
 if [ "$EGVMUSESIPSERVER" = "1" ]; then
@@ -126,6 +131,14 @@ while (($#)); do
             exit -1
         fi
         echo $?
+    elif [ "$BRANCH" != "$HEAD" -a "$HEAD" = "MASSLNC" ]; then
+        # To check out from the main repo we have to add the proper remote, fetch it, then checkout
+        cd working/$EGVMNAME/$REPO && git fetch masslnc && git merge masslnc/$BRANCH
+        if [ $? -ne 0 ]; then
+            echo "MassLNC branch of $BRANCH for $REPO could not be merged (Request: $1)"
+            exit -1
+        fi
+        echo $?
     # At this point the only extra piece allowed is BASE:, so fail if that isn't what was provided
     elif [ "$BRANCH" != "$HEAD" ]; then
         echo "Unknown modifier: $HEAD (Request: $1)"
@@ -190,4 +203,5 @@ if [ "$EGVMUSESIPSERVER" = "1" ]; then
     echo "perl SIPServer.pm /openils/conf/oils_sip.xml"
 fi
 
-
+ssh-keygen -f "/home/masslnc/.ssh/known_hosts" -R $EGVMNAME > /dev/null 2>&1
+ssh-keygen -f "/home/masslnc/.ssh/known_hosts" -R $EGVMNAME.$EGVMDOMAIN > /dev/null 2>&1