2022-04-21 05:18:58 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
fw_dir="firmware/download"
|
|
|
|
sim_dir="firmware/simulate"
|
|
|
|
colors=("green" "blue")
|
2022-11-30 00:01:47 +08:00
|
|
|
variants=("standard" "backer" "alt_time" "deep_space_now" "focus" "the_athlete" "the_backpacker" "the_stargazer")
|
2022-04-21 05:18:58 +08:00
|
|
|
|
|
|
|
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
|
2022-11-30 00:01:47 +08:00
|
|
|
rm -rf ./build-sim
|
2022-04-21 05:18:58 +08:00
|
|
|
emmake make FIRMWARE=$VARIANT
|
|
|
|
mkdir "$sim_dir/$variant/"
|
2022-11-02 03:18:23 +08:00
|
|
|
mv "build-sim/watch.wasm" "$sim_dir/$variant/"
|
|
|
|
mv "build-sim/watch.js" "$sim_dir/$variant/"
|
|
|
|
mv "build-sim/watch.html" "$sim_dir/$variant/index.html"
|
2022-04-21 05:18:58 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
echo "Done."
|