From 6de532e088774461c0357d8c03bcea57759e8231 Mon Sep 17 00:00:00 2001 From: Mikkel Schmidt Date: Fri, 7 Jun 2024 16:13:07 +0200 Subject: [PATCH] Boards: fix automatic sd card flashing scripts --- boards/btt-skr-14-turbo/flash.sh | 2 +- boards/btt-skr-14/flash.sh | 2 +- boards/btt-skr-pro-12/flash.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boards/btt-skr-14-turbo/flash.sh b/boards/btt-skr-14-turbo/flash.sh index 173dd529..aeab4e0c 100755 --- a/boards/btt-skr-14-turbo/flash.sh +++ b/boards/btt-skr-14-turbo/flash.sh @@ -9,7 +9,7 @@ pushd /home/pi/klipper || exit service klipper stop -if su -c "./scripts/flash-sdcard.sh /dev/btt-skr-14-turbo generic-lpc1769" pi -eq 0; then +if [ "$(su -c ./scripts/flash-sdcard.sh /dev/btt-skr-14-turbo generic-lpc1769 pi)" -eq 0 ]; then echo "Flashing successful!" else echo "Flashing failed :(" diff --git a/boards/btt-skr-14/flash.sh b/boards/btt-skr-14/flash.sh index 718968f7..7842aa94 100755 --- a/boards/btt-skr-14/flash.sh +++ b/boards/btt-skr-14/flash.sh @@ -8,7 +8,7 @@ fi pushd /home/pi/klipper || exit service klipper stop -if su -c "./scripts/flash-sdcard.sh /dev/btt-skr-14 generic-lpc1768" pi -eq 0; then +if [ "$(su -c ./scripts/flash-sdcard.sh /dev/btt-skr-14 generic-lpc1768 pi)" -eq 0 ]; then echo "Flashing successful!" else echo "Flashing failed :(" diff --git a/boards/btt-skr-pro-12/flash.sh b/boards/btt-skr-pro-12/flash.sh index 283956aa..6bd13674 100755 --- a/boards/btt-skr-pro-12/flash.sh +++ b/boards/btt-skr-pro-12/flash.sh @@ -8,7 +8,7 @@ fi pushd /home/pi/klipper || exit service klipper stop -if su -c "./scripts/flash-sdcard.sh /dev/btt-skr-pro-12 btt-skr-pro-v1.2" pi -eq 0; then +if [ "$(su -c ./scripts/flash-sdcard.sh /dev/btt-skr-pro-12 btt-skr-pro-v1.2 pi)" -eq 0 ]; then echo "Flashing successful!" else echo "Flashing failed :("