diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-07-24 14:52:12 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-07-25 17:12:35 +0200 |
commit | 73604962a177d654c4196d6ff7d9dd74f71aea37 (patch) | |
tree | 8bffc0940e2dae861aa2a877fdc671a3508ee6a1 /gbp/command_wrappers.py | |
parent | 011b4d4e891b91dd8f9f140295c412b4a277663e (diff) | |
download | git-buildpackage-73604962a177d654c4196d6ff7d9dd74f71aea37.tar.gz git-buildpackage-73604962a177d654c4196d6ff7d9dd74f71aea37.tar.bz2 git-buildpackage-73604962a177d654c4196d6ff7d9dd74f71aea37.zip |
Support importing zip archives
This can now be easily extended to support other formats
Diffstat (limited to 'gbp/command_wrappers.py')
-rw-r--r-- | gbp/command_wrappers.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py index 64300cfb..2f77a7b4 100644 --- a/gbp/command_wrappers.py +++ b/gbp/command_wrappers.py @@ -200,6 +200,16 @@ class DpkgSourceExtract(Command): Command.__call__(self, [dsc, output_dir]) +class UnpackZipArchive(Command): + """Wrap zip to Unpack a zip file""" + def __init__(self, archive, dir): + self.archive = archive + self.dir = dir + + Command.__init__(self, 'unzip', [ "-q", archive, '-d', dir ]) + self.run_error = 'Couldn\'t unpack "%s"' % self.archive + + class GitCommand(Command): "Mother/Father of all git commands" def __init__(self, cmd, args=[], **kwargs): |