2023-03-09 03:37:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-03-10 02:01:20 +00:00
|
|
|
#sync libs'
|
|
|
|
|
|
|
|
if [ -f "$(which jq)" ]; then
|
|
|
|
HEADER=ino/lib/McopySerial/McopySerial.h
|
|
|
|
TMP_FILE=$(mktemp)
|
|
|
|
|
|
|
|
awk '{print} /CMD FLAGS/ {exit}' "${HEADER}" > "${TMP_FILE}"
|
|
|
|
|
2023-03-22 00:35:00 +00:00
|
|
|
cat ./data/cfg.json | jq -r '.arduino.cmd | keys[] as $k | " const char \($k) = '"'"'\(.[$k])'"'"';"' | awk '{print "\t"$1" "$2" "toupper($3)" "$4" "$5}' >> "${TMP_FILE}"
|
2023-03-10 02:01:20 +00:00
|
|
|
|
|
|
|
awk '/END CMD/,EOF { print $0 }' "${HEADER}" >> "${TMP_FILE}"
|
|
|
|
|
|
|
|
cp "${TMP_FILE}" "${HEADER}"
|
|
|
|
rm -f "${TMP_FILE}"
|
|
|
|
fi
|
2023-03-09 03:37:40 +00:00
|
|
|
|
2023-04-11 04:37:14 +00:00
|
|
|
SKETCHES=(
|
2023-04-16 02:44:33 +00:00
|
|
|
mcopy_arri_s_firmware
|
2023-06-28 03:16:16 +00:00
|
|
|
mcopy_cam_canon_ble_nano
|
2023-04-11 04:38:06 +00:00
|
|
|
mcopy_cam_relay
|
2023-04-11 04:37:14 +00:00
|
|
|
mcopy_JKMM100
|
2023-11-26 01:05:52 +00:00
|
|
|
mcopy_JKMM100_work
|
2023-04-11 04:37:14 +00:00
|
|
|
components/mcopy_light
|
2023-05-25 14:43:45 +00:00
|
|
|
mcopy_projector_firmware
|
2024-04-20 00:09:44 +00:00
|
|
|
mcopy_ACME_Trebes_Nanolab
|
2023-04-11 04:37:14 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
for sketch in "${SKETCHES[@]}"; do
|
|
|
|
cp ino/lib/McopySerial/McopySerial.* ino/${sketch}/
|
|
|
|
done
|
2023-03-24 17:50:38 +00:00
|
|
|
|
|
|
|
if [ -d ../McopySerial ]; then
|
|
|
|
cp ino/lib/McopySerial/McopySerial.* ../McopySerial/
|
|
|
|
fi
|