Skip to content
Browse files

Dash support broke, using POSIX case instead.

  • Loading branch information...
1 parent 3b94973 commit 32c4f0312bb60cfa42757677935d620be3f90db2 @gamaral committed
Showing with 7 additions and 5 deletions.
  1. +7 −5 board/raspberrypi/mksdcard
View
12 board/raspberrypi/mksdcard
@@ -138,14 +138,16 @@ END
sleep 1
+# figure out partition pattern
+
+case "${SDCARD}" in
+ *mmcblk*) SDCARDP="${SDCARD}p" ;;
+ *) SDCARDP="${SDCARD}" ;;
+esac
+
# format partitions
section "Formatting partitions..."
-if [[ "${SDCARD}" = "/dev/mmcblk"* ]]; then
- SDCARDP="${SDCARD}p"
-else
- SDCARDP=${SDCARD}
-fi
${MKFS_VFAT} -F 16 -n BOOT -I "${SDCARDP}1" || exit 1
${MKFS_EXT4} -F -q -L rootfs "${SDCARDP}2" || exit 1

0 comments on commit 32c4f03

Please sign in to comment.
Something went wrong with that request. Please try again.