mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 07:05:46 +03:00
proton: Support any proton_dist compression scheme
This commit is contained in:
parent
24300e3f27
commit
230b9d81a2
9
proton
9
proton
@ -116,7 +116,14 @@ class Proton:
|
|||||||
not filecmp.cmp(self.version_file, self.path("dist/version")):
|
not filecmp.cmp(self.version_file, self.path("dist/version")):
|
||||||
if os.path.exists(self.dist_dir):
|
if os.path.exists(self.dist_dir):
|
||||||
shutil.rmtree(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.extractall(path=self.dist_dir)
|
||||||
tar.close()
|
tar.close()
|
||||||
try_copy(self.version_file, self.dist_dir)
|
try_copy(self.version_file, self.dist_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user