You can clone with HTTPS or SSH.
# xz support module # copyright 2010 Jack Laxson (Jrabbit) from subprocess import Popen import os def is_xzfile(path): extension = path.split("/")[-1].split(".")[-1] if extension is "xz": return True def expand(xz): Popen(['xz', '-d', xz]) # move all the files into the workingdir def move(path, workDir): pwd = path.split("/")[:-1] for f in os.listdir(pwd) os.rename(f, os.path.join(workDir, f))
Index: haikuporter =================================================================== --- haikuporter (revision 1221) +++ haikuporter (working copy) @@ -24,7 +24,7 @@ import hashlib import shutil import commands -from subprocess import check_call +from subprocess import check_call, Popen from optparse import OptionParser # -- HaikuPorts options ------------------------------------------------------- @@ -684,6 +684,13 @@ zf = zipfile.ZipFile(self.downloadDir + "/" + self.src_local, 'r') zf.extractall(self.workDir) zf.close() + elif archiveFullPath.split("/")[-1].split(".")[-1] == "xz": + Popen(['xz', '-d', archiveFullPath]) + tar = archiveFullPath[:-3] + if tarfile.is_tarfile(tar): + tf = tarfile.open(tar, 'r') + tf.extractall(self.workDir) + tf.close() else: sys.exit("Error: Unrecognized archive type.")