Commit acab0104 authored by Sebastien Jourdain's avatar Sebastien Jourdain

Fix suffix management with .tar.gz extension

Change-Id: I586fe6ee681014d06a3867a8c2e7548a9e4f2519
parent 06b37626
......@@ -115,8 +115,11 @@ def downloadFiles(buildInfo, destination, suffix):
for url in info['urls']:
dstFileName = url.split('/')[-1]
if suffix:
extensionIndex = dstFileName.rfind(".")
dstFileName = dstFileName[0:extensionIndex] + '-' + suffix + dstFileName[extensionIndex:]
if dstFileName.endswith(".tar.gz"):
dstFileName = dstFileName[0:-7] + '-' + suffix + '.tar.gz'
else:
extensionIndex = dstFileName.rfind(".")
dstFileName = dstFileName[0:extensionIndex] + '-' + suffix + dstFileName[extensionIndex:]
fulldestinationPath = destination + "/" + dstFileName
print "Downloading %s" % fulldestinationPath
urllib.urlretrieve (url, fulldestinationPath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment