From d5b450c8fac4371b6beba866da088f8ea24f7ecd Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Fri, 29 Apr 2022 15:39:36 +0300 Subject: [PATCH] [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 --- kotlin-native/tools/scripts/repack_bundles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kotlin-native/tools/scripts/repack_bundles.py b/kotlin-native/tools/scripts/repack_bundles.py index c22644bbc5a..bad3f6c1832 100755 --- a/kotlin-native/tools/scripts/repack_bundles.py +++ b/kotlin-native/tools/scripts/repack_bundles.py @@ -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)