From ff7880882c90372b0a12415931d6d66086017107 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Fri, 23 Jun 2017 17:16:37 +0200 Subject: [PATCH] Update git config after checkout --- scripts/salome_download.py | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/scripts/salome_download.py b/scripts/salome_download.py index dbbcd56..1fccf23 100644 --- a/scripts/salome_download.py +++ b/scripts/salome_download.py @@ -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) -- 2.39.2