recreate files if extra script changes
This commit is contained in:
parent
2b91ce71bb
commit
03740a9034
|
@ -7,6 +7,8 @@ import inspect
|
||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
Import("env")
|
Import("env")
|
||||||
|
#print(env.Dump())
|
||||||
|
OWN_FILE="extra_script.py"
|
||||||
GEN_DIR='generated'
|
GEN_DIR='generated'
|
||||||
CFG_FILE='web/config.json'
|
CFG_FILE='web/config.json'
|
||||||
XDR_FILE='web/xdrconfig.json'
|
XDR_FILE='web/xdrconfig.json'
|
||||||
|
@ -43,6 +45,11 @@ def isCurrent(infile,outfile):
|
||||||
otime=os.path.getmtime(outfile)
|
otime=os.path.getmtime(outfile)
|
||||||
itime=os.path.getmtime(infile)
|
itime=os.path.getmtime(infile)
|
||||||
if (otime >= itime):
|
if (otime >= itime):
|
||||||
|
own=os.path.join(basePath(),OWN_FILE)
|
||||||
|
if os.path.exists(own):
|
||||||
|
owntime=os.path.getmtime(own)
|
||||||
|
if owntime > otime:
|
||||||
|
return False
|
||||||
print("%s is newer then %s, no need to recreate"%(outfile,infile))
|
print("%s is newer then %s, no need to recreate"%(outfile,infile))
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue