From 03740a9034b05ea2f2bc8ad6f173f89ff5efc919 Mon Sep 17 00:00:00 2001 From: wellenvogel <andreas@wellenvogel.de> Date: Sun, 21 Nov 2021 22:08:02 +0100 Subject: [PATCH] recreate files if extra script changes --- extra_script.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extra_script.py b/extra_script.py index 8d58014..89efc93 100644 --- a/extra_script.py +++ b/extra_script.py @@ -7,6 +7,8 @@ import inspect import json from datetime import datetime Import("env") +#print(env.Dump()) +OWN_FILE="extra_script.py" GEN_DIR='generated' CFG_FILE='web/config.json' XDR_FILE='web/xdrconfig.json' @@ -43,6 +45,11 @@ def isCurrent(infile,outfile): otime=os.path.getmtime(outfile) itime=os.path.getmtime(infile) 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)) return True return False