mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
CopyTree should update altered files properly
This commit is contained in:
parent
f5d6dc7bfe
commit
c0f74e9da3
@ -1933,8 +1933,18 @@ def CopyAllHeaders(dir, skip=[]):
|
|||||||
WriteFile(dstfile,ReadFile(srcfile))
|
WriteFile(dstfile,ReadFile(srcfile))
|
||||||
JustBuilt([dstfile],[srcfile])
|
JustBuilt([dstfile],[srcfile])
|
||||||
|
|
||||||
def CopyTree(dstdir,srcdir):
|
def CopyTree(dstdir, srcdir, omitCVS=True):
|
||||||
if (os.path.isdir(dstdir)): return 0
|
if (os.path.isdir(dstdir)):
|
||||||
|
for entry in os.listdir(srcdir):
|
||||||
|
srcpth = os.path.join(srcdir, entry)
|
||||||
|
dstpth = os.path.join(dstdir, entry)
|
||||||
|
if (os.path.isfile(srcpth)):
|
||||||
|
if (not omitCVS or entry != ".cvsignore"):
|
||||||
|
CopyFile(dstpth, srcpth)
|
||||||
|
else:
|
||||||
|
if (not omitCVS or entry != "CVS"):
|
||||||
|
CopyTree(dstpth, srcpth)
|
||||||
|
else:
|
||||||
if (sys.platform == "win32"):
|
if (sys.platform == "win32"):
|
||||||
cmd = 'xcopy /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"'
|
cmd = 'xcopy /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"'
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user