Polished out flash script
This commit is contained in:
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user