Skip to content

Commit fd8e983

Browse files
author
Spacehuhn
committed
Improved compiler script
1 parent ac7bf78 commit fd8e983

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

utils/arduino-cli-compile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,19 @@
4848

4949
version = sys.argv[1]
5050

51-
folder = f"build_{version}"
51+
folder = f"../build_{version}"
5252
os.system(f"mkdir {folder}")
5353

5454
for board in boards:
55-
print(f"Compiling {board}...", end="", flush=True)
55+
print(f"Compiling {board}...", flush=True)
5656
os.system(f"arduino-cli cache clean");
5757
command = f"arduino-cli compile --fqbn deauther:esp8266:d1_mini --build-properties \"build.extra_flags=-DESP8266 -D{board}\" --output-dir {folder}"
5858
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
5959
process.wait()
6060
os.system(f"mv {folder}/esp8266_deauther.ino.bin {folder}/esp8266_deauther_{version}_{board}.bin")
6161
print(f"OK")
6262

63-
os.system("rm build/*.elf && rm build/*.map")
63+
os.system(f"rm {folder}/esp8266_deauther.ino.elf")
64+
os.system(f"rm {folder}/esp8266_deauther.ino.map")
65+
6466
print("Finished :)")

0 commit comments

Comments
 (0)