summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-xscripts/contrib/convert-srcuri.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/contrib/convert-srcuri.py b/scripts/contrib/convert-srcuri.py
index 5b362ea2e8..587392334f 100755
--- a/scripts/contrib/convert-srcuri.py
+++ b/scripts/contrib/convert-srcuri.py
@@ -35,16 +35,16 @@ def processfile(fn):
if ("git://" in line or "gitsm://" in line) and "branch=" not in line and matchline(line):
if line.endswith('"\n'):
line = line.replace('"\n', ';branch=master"\n')
- elif line.endswith(" \\\n"):
- line = line.replace(' \\\n', ';branch=master \\\n')
+ elif re.search('\s*\\\\$', line):
+ line = re.sub('\s*\\\\$', ';branch=master \\\\', line)
modified = True
if ("git://" in line or "gitsm://" in line) and "github.com" in line and "protocol=https" not in line and matchline(line):
if "protocol=git" in line:
line = line.replace('protocol=git', 'protocol=https')
elif line.endswith('"\n'):
line = line.replace('"\n', ';protocol=https"\n')
- elif line.endswith(" \\\n"):
- line = line.replace(' \\\n', ';protocol=https \\\n')
+ elif re.search('\s*\\\\$', line):
+ line = re.sub('\s*\\\\$', ';protocol=https \\\\', line)
modified = True
new_file.write(line)
if modified: