[K/N][publish] Fix getting the extracted dir name
Python's rstrip() method with argument removes not the string but all combinations of specified chars
This commit is contained in:
@@ -24,7 +24,7 @@ for bundle in bundles:
|
||||
unpackCommand = 'unzip -qq' if bundle.endswith('.zip') else 'tar -xzf'
|
||||
os.system(unpackCommand + ' ' + bundle)
|
||||
|
||||
extractedDir = bundle.rstrip('.tar.gz').rstrip('.zip')
|
||||
extractedDir = bundle.replace('.tar.gz', '').replace('.zip', '')
|
||||
renamedDir = extractedDir.replace('-prebuilt-', '-')
|
||||
print('Renaming ' + extractedDir + ' to ' + renamedDir)
|
||||
os.rename(extractedDir, renamedDir)
|
||||
|
||||
Reference in New Issue
Block a user