From 50447bddae24704a7b245823bfc98e3e8372da07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Santilio?= Date: Mon, 24 Aug 2020 13:45:28 +0200 Subject: [PATCH] --- .../resources/extraction/unzip.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 addons/github-integration/resources/extraction/unzip.py diff --git a/addons/github-integration/resources/extraction/unzip.py b/addons/github-integration/resources/extraction/unzip.py deleted file mode 100644 index 9d4233a..0000000 --- a/addons/github-integration/resources/extraction/unzip.py +++ /dev/null @@ -1,19 +0,0 @@ -import glob,zipfile,shutil,os,sys,tarfile - -archive = sys.argv[1] -destination = sys.argv[2] - -if archive.endswith('.zip'): - with zipfile.ZipFile(archive) as zip: - for zip_info in zip.infolist(): - if zip_info.filename == zip.infolist()[0].filename : - continue - zip_info.filename = zip_info.filename.replace(zip.infolist()[0].filename,'') - zip_info.filename.replace(zip.infolist()[0].filename,'') -elif archive.endswith('.tar.gz'): - tar = tarfile.open(archive) - for member in tar.getmembers(): - if member.name == tar.getmembers()[0].name: - continue - member.name = member.name.replace(tar.getmembers()[0].name+'/','') - tar.extract(member, destination)