1 2 3 4 5 6 7 8
#!/usr/bin/python import re x = open('.gitmodules').read() x = re.sub(r"url *= *\.\.", "url = https://gitlab.haskell.org/ghc", x) open('.gitmodules', 'w').write(x)