From 230b9d81a2104be7d3538a1eeb418cb73d033bf8 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Fri, 18 Oct 2019 10:09:36 -0500 Subject: [PATCH] proton: Support any proton_dist compression scheme --- proton | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/proton b/proton index e763ab9e..e2e16054 100755 --- a/proton +++ b/proton @@ -116,7 +116,14 @@ class Proton: not filecmp.cmp(self.version_file, self.path("dist/version")): if os.path.exists(self.dist_dir): shutil.rmtree(self.dist_dir) - tar = tarfile.open(self.path("proton_dist.tar"), mode="r") + tar = None + for sf in ["", ".xz", ".bz2", ".gz"]: + if os.path.exists(self.path("proton_dist.tar" + sf)): + tar = tarfile.open(self.path("proton_dist.tar" + sf), mode="r:*") + break + if not tar: + log("No proton_dist tarball??") + sys.exit(1) tar.extractall(path=self.dist_dir) tar.close() try_copy(self.version_file, self.dist_dir)