Artık install dizini de ekleniyor. Yiha!
This commit is contained in:
+1
-1
@@ -62,9 +62,9 @@ class ArchiveZip(ArchiveBase):
|
|||||||
self.zip.close()
|
self.zip.close()
|
||||||
|
|
||||||
def add_file(self, file):
|
def add_file(self, file):
|
||||||
|
"""add file or directory to a zip file"""
|
||||||
if os.path.isdir(file):
|
if os.path.isdir(file):
|
||||||
self.zip.writestr(file + '/', '')
|
self.zip.writestr(file + '/', '')
|
||||||
print file
|
|
||||||
for f in os.listdir(file):
|
for f in os.listdir(file):
|
||||||
self.add_file(file + '/' + f)
|
self.add_file(file + '/' + f)
|
||||||
else:
|
else:
|
||||||
|
|||||||
+1
-1
@@ -224,6 +224,6 @@ class PisiBuild:
|
|||||||
os.chdir(self.ctx.pkg_dir())
|
os.chdir(self.ctx.pkg_dir())
|
||||||
pkg.add_file(self.ctx.const.metadata_xml)
|
pkg.add_file(self.ctx.const.metadata_xml)
|
||||||
pkg.add_file(self.ctx.const.files_xml)
|
pkg.add_file(self.ctx.const.files_xml)
|
||||||
# pkd.add_dir("install")
|
pkg.add_file("install")
|
||||||
pkg.close()
|
pkg.close()
|
||||||
os.chdir(c)
|
os.chdir(c)
|
||||||
|
|||||||
+2
-2
@@ -12,8 +12,8 @@ class Package:
|
|||||||
self.filename = packagefn
|
self.filename = packagefn
|
||||||
|
|
||||||
def add_file(self, fn):
|
def add_file(self, fn):
|
||||||
"""add a file to package"""
|
"""add a file or directory to package"""
|
||||||
self.impl.add_file(self.filename, fn)
|
self.impl.add_file(fn)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.impl.close()
|
self.impl.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user