Polished out flash script

This commit is contained in:
2026-05-29 18:24:00 +02:00
parent 433b175db2
commit 7527865364
+7 -1
View File
@@ -10,10 +10,14 @@ files=(
# find mountpoint
target="$(findmnt -rn -S LABEL=CIRCUITPY -o TARGET)/"
echo "attemting to write to ${target}"
read -p "Continue? [y/N] " confirm
[[ "$confirm" == [yY] ]] || exit 1
# Flash
if [ -d "${target}" ]; then
for file in "${files[@]}"; do
echo $file
echo -n "$file "
# delete old version
rm "${target}${file}" -r
@@ -24,3 +28,5 @@ if [ -d "${target}" ]; then
else
echo "Board not mounted!"
fi
echo "-> done!"