mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-10 18:24:27 +05:00
17 lines
484 B
Python
17 lines
484 B
Python
import shutil
|
|
import os
|
|
Import("env")
|
|
|
|
def post_build(source, target, env):
|
|
if os.path.exists(os.path.join(env["PROJECT_DIR"], "build")) == False:
|
|
return
|
|
|
|
src = target[0].get_abspath()
|
|
dest = os.path.join(env["PROJECT_DIR"], "build", "firmware_%s_%s.bin" % (env.GetProjectOption("board"), env.GetProjectOption("version")))
|
|
|
|
#print("dest:"+dest)
|
|
#print("source:"+src)
|
|
|
|
shutil.copy(src, dest)
|
|
|
|
env.AddPostAction("$BUILD_DIR/firmware.bin", post_build) |