arduino/libraries/CMMC_MQTT_Connector/extra_script.py

23 lines
760 B
Python
Raw Permalink Normal View History

2018-11-03 20:21:33 +00:00
from SCons.Script import DefaultEnvironment
import glob, shutil, os
2018-11-13 14:50:48 +00:00
import time
2018-11-03 20:21:33 +00:00
env = DefaultEnvironment()
2018-11-13 14:50:48 +00:00
# env.Replace(PROGNAME="firmware_%s" % defines.get("VERSION"))
2018-11-03 20:21:33 +00:00
# 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..."
2018-11-13 14:50:48 +00:00
# shutil.rmtree("pio_compile_here/MqttConnector", ignore_errors=True)
# time.sleep(2)
2018-11-03 20:21:33 +00:00
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")