summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2017-04-23 18:05:44 (GMT)
committerRobert Foss <robert.foss@collabora.com>2017-04-23 18:05:44 (GMT)
commit4cc854379d112e72d5250a6be749d5dd26f91508 (patch)
treedc094d65d19f348c04ed3e97da2be2acb3b11a8a
parente99b08cc7df489d05901ab08725847baeabcdea5 (diff)
downloadrdu2-4cc854379d112e72d5250a6be749d5dd26f91508.tar.gz
rdu2-4cc854379d112e72d5250a6be749d5dd26f91508.tar.xz
Fix broken script
-rwxr-xr-xsetup_sdcard.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/setup_sdcard.sh b/setup_sdcard.sh
index 407cc00..9e26107 100755
--- a/setup_sdcard.sh
+++ b/setup_sdcard.sh
@@ -1,9 +1,13 @@
+#!/bin/bash
+
DEV=${1:-"/dev/mmcblk0"}
-if [ ! -a "${DEV}" ]; then
- echo "No valid device found in \"${DEV}\""
+
+if ! [[ -a $DEV ]]; then
+ echo "No valid device found, \"${DEV}\" is not valid"
exit 1
fi
-sudo umount "${DEV}"
+
+sudo umount ${DEV}*
(
# Create a new empty DOS partition table
echo o