]> SALOME platform Git repositories - tools/pvdeliv.git/commitdiff
Salome HOME
Update git config after checkout
authorCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 23 Jun 2017 15:16:37 +0000 (17:16 +0200)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Fri, 23 Jun 2017 15:16:37 +0000 (17:16 +0200)
scripts/salome_download.py

index dbbcd563ed86decbe9d8fe96d4d1465f8425f025..1fccf2304c90caf5bf7ae292d6f9cfea1a2e7277 100644 (file)
@@ -96,26 +96,8 @@ def __extractSrcFromGit(gitLoc,srcDir,pattern,use_pleiade_mirrors=False):
         pass
       assert(_status==0)
 
-      # Update git config
-      for key, val in submodules.items():
-        if val != "":
-          local_command = "git config "
-          local_command += "-f .gitmodules "
-          local_command += "submodule.%s.url %s" % (key, val)
-          p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True)
-          p.communicate()
-
     else:
 
-      # Update git config
-      for key, val in submodules.items():
-        if val != "":
-          local_command = "git config "
-          local_command += "-f .gitmodules "
-          local_command += "submodule.%s.url %s" % (key, val)
-          p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True)
-          p.communicate()
-
       # Fetch
       print("Fetching %s..."%dirGitLoc)
       assert(os.path.exists(os.path.join(dirGitLoc,".git")))
@@ -134,6 +116,15 @@ def __extractSrcFromGit(gitLoc,srcDir,pattern,use_pleiade_mirrors=False):
       if p_err: msg += p_err
       raise Exception(msg)
 
+    # Update git config
+    for key, val in submodules.items():
+      if val != "":
+        local_command = "git config "
+        local_command += "-f .gitmodules "
+        local_command += "submodule.%s.url %s" % (key, val)
+        p=subprocess.Popen(local_command,cwd=dirGitLoc,shell=True)
+        p.communicate()
+
     # Init and Update submodules
     if dirGitLoc in ["ParaView", "prerequisites-salome.paraview"]:
       p=subprocess.Popen(["git","submodule","update","--init","--recursive"],cwd=dirGitLoc)