arduino/libraries/CMMC_MQTT_Connector/extra_script.py
Martin Donnelly e9c94ebfff update
2018-11-13 14:50:48 +00:00

23 lines
760 B
Python

from SCons.Script import DefaultEnvironment
import glob, shutil, os
import time
env = DefaultEnvironment()
# env.Replace(PROGNAME="firmware_%s" % defines.get("VERSION"))
# uncomment line below to see environment variables
# print env.Dump()
# print ARGUMENTS
# copyfile("src/MqttConnector.h", "tmp/MqttConnector/MqttConnector.h")
# copyfile("src/MqttConnector.cpp", "tmp/MqttConnector/MqttConnector.cpp")
print "BEING COPY FILES..."
# shutil.rmtree("pio_compile_here/MqttConnector", ignore_errors=True)
# time.sleep(2)
if not os.path.exists("pio_compile_here/MqttConnector"):
os.makedirs("pio_compile_here/MqttConnector")
for file in glob.iglob('src/*.*'):
print 'Copied file %s' % (file)
shutil.copy2(file, "pio_compile_here/MqttConnector")