mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Added pzkeep option
This commit is contained in:
parent
21eea17348
commit
10e2a1847b
@ -27,11 +27,15 @@ class EggCacher:
|
|||||||
self.processFiles(files)
|
self.processFiles(files)
|
||||||
|
|
||||||
def parseArgs(self, args):
|
def parseArgs(self, args):
|
||||||
self.concise =0
|
self.concise = 0
|
||||||
|
self.pzkeep = 0
|
||||||
while len(args):
|
while len(args):
|
||||||
if (args[0]=="--concise"):
|
if (args[0]=="--concise"):
|
||||||
self.concise = 1
|
self.concise = 1
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
|
elif (args[0]=="--pzkeep"):
|
||||||
|
self.pzkeep = 1
|
||||||
|
args = args[1:]
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
if (len(args) < 1):
|
if (len(args) < 1):
|
||||||
@ -47,9 +51,14 @@ class EggCacher:
|
|||||||
for f in os.listdir(path):
|
for f in os.listdir(path):
|
||||||
self.scanPath(eggs, os.path.join(path,f))
|
self.scanPath(eggs, os.path.join(path,f))
|
||||||
return
|
return
|
||||||
if (path.endswith(".egg")) or (path.endswith(".egg.pz")):
|
if (path.endswith(".egg")):
|
||||||
size = os.path.getsize(path)
|
size = os.path.getsize(path)
|
||||||
eggs.append((path,size))
|
eggs.append((path,size))
|
||||||
|
return
|
||||||
|
if (path.endswith(".egg.pz")):
|
||||||
|
size = os.path.getsize(path)
|
||||||
|
if (self.pzkeep): eggs.append((path,size))
|
||||||
|
else: eggs.append((path[:-3],size))
|
||||||
|
|
||||||
def scanPaths(self, paths):
|
def scanPaths(self, paths):
|
||||||
eggs = []
|
eggs = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user