Support a per-aircraft exclude file.
- needed to make the P51D not be crazy large.
This commit is contained in:
parent
d2cb130135
commit
f61ceb1293
1 changed files with 9 additions and 2 deletions
11
package.py
11
package.py
|
@ -170,9 +170,16 @@ class PackageData:
|
||||||
os.chdir(os.path.dirname(self.path))
|
os.chdir(os.path.dirname(self.path))
|
||||||
|
|
||||||
print "Creating zip", zipFilePath
|
print "Creating zip", zipFilePath
|
||||||
# TODO: exclude certain files
|
|
||||||
# anything we can do to make this faster?
|
# anything we can do to make this faster?
|
||||||
subprocess.call(['zip', '--quiet', '-r', zipFilePath, self.id])
|
|
||||||
|
zipArgs = ['zip', '--quiet', '-r']
|
||||||
|
excludePath = os.path.join(self.path, 'package-exclude.lst')
|
||||||
|
if (os.path.exists(excludePath)):
|
||||||
|
print self.id, "has zip exclude list"
|
||||||
|
zipArgs += ["-x@" + excludePath]
|
||||||
|
|
||||||
|
zipArgs += [zipFilePath, self.id]
|
||||||
|
subprocess.call(zipArgs)
|
||||||
|
|
||||||
zipFile = open(zipFilePath, 'r')
|
zipFile = open(zipFilePath, 'r')
|
||||||
self._md5 = hashlib.md5(zipFile.read()).hexdigest()
|
self._md5 = hashlib.md5(zipFile.read()).hexdigest()
|
||||||
|
|
Loading…
Add table
Reference in a new issue