Basit unpack araci.

This commit is contained in:
Faik Uygur
2006-05-08 17:31:14 +00:00
parent 4356d6147d
commit 9172a2bb60
Executable
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
import sys
from pisi.archive import ArchiveZip
def usage(errmsg):
print """
Error: %s
Usage:
unpisi PiSi_package.PiSi
""" % (errmsg)
sys.exit(1)
def main():
if len(sys.argv) < 2:
usage("PiSi package required..")
arc = ArchiveZip(sys.argv[1], 'zip', 'r')
arc.unpack_files(['files.xml', 'metadata.xml'], '.')
arc.unpack_dir_flat('comar','comar')
arc.unpack_dir_flat('install','.')
return 0
if __name__ == "__main__":
sys.exit(main())