diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2022-05-02 18:39:45 -0500 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2022-05-02 18:39:45 -0500 |
commit | cd405735351035df657b64547b3dfc6a3d59db56 (patch) | |
tree | 1cdd5e6b0d0434d20f71045178a1e5e7377eb56f /movement/make/make_alternate_fw.sh | |
parent | 0004c30f422e702fd184a54e9f1d55da878bcd0f (diff) | |
parent | 35d1f5e647ac1b5fcccdb43ec58058587dd5301b (diff) | |
download | Sensor-Watch-cd405735351035df657b64547b3dfc6a3d59db56.tar.gz Sensor-Watch-cd405735351035df657b64547b3dfc6a3d59db56.tar.bz2 Sensor-Watch-cd405735351035df657b64547b3dfc6a3d59db56.zip |
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch into motion-express
Diffstat (limited to 'movement/make/make_alternate_fw.sh')
-rwxr-xr-x | movement/make/make_alternate_fw.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/movement/make/make_alternate_fw.sh b/movement/make/make_alternate_fw.sh new file mode 100755 index 00000000..575c9e52 --- /dev/null +++ b/movement/make/make_alternate_fw.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +fw_dir="firmware/download" +sim_dir="firmware/simulate" +colors=("green" "blue") +variants=("standard" "alt_time" "deep_space_now" "focus" "the_athlete" "the_backpacker" "the_stargazer") + +if [ -d "$fw_dir" ] ; then + rm -r "$fw_dir" +fi +if [ -d "$sim_dir" ] ; then + rm -r "$sim_dir" +fi + +mkdir -p "$fw_dir" +mkdir -p "$sim_dir" + +for variant in "${variants[@]}" +do + VARIANT=$(echo "$variant" | tr '[:lower:]' '[:upper:]') + for color in "${colors[@]}" + do + COLOR=$(echo "$color" | tr '[:lower:]' '[:upper:]') + make clean + make LED=$COLOR FIRMWARE=$VARIANT + mv "build/watch.uf2" "$fw_dir/$variant-$color.uf2" + done + make clean + emmake make FIRMWARE=$VARIANT + mkdir "$sim_dir/$variant/" + mv "build/watch.wasm" "$sim_dir/$variant/" + mv "build/watch.js" "$sim_dir/$variant/" + mv "build/watch.html" "$sim_dir/$variant/index.html" +done + +echo "Done." |