Skip to content

Commit

Permalink
updated script to check minimum disk number
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai Nueleanu authored and Mihai Nueleanu committed Sep 10, 2020
1 parent 3709c4f commit 9f7e753
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion image_to_sd_card.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ do

done

if [ -z "$disk" ] || [ -z "$version" ] || [ "$version" -lt "2" ]
if [ -z "$disk" ] || [ -z "$version" ] || [ "$disk" -lt "2" ];
then
echo "You must specify disk and version variables"
echo "Example: ./image_to_sd_card.sh disk=2 version=0.0.9"
Expand All @@ -25,6 +25,7 @@ else

diskutil unmountDisk /dev/disk$disk
sudo dd bs=1m if=kiosk-$version-shrinked.img of=/dev/rdisk$disk; sync
sleep 5
sudo diskutil eject /dev/rdisk$disk

fi
2 changes: 1 addition & 1 deletion sd_card_to_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ do

done

if [ -z "$disk" ] || [ -z "$version" ] || [ "$version" -lt "2" ]
if [ -z "$disk" ] || [ -z "$version" ] || [ "$disk" -lt "2" ];
then
echo "You must specify disk and version variables"
echo "Example: ./sd_card_to_image.sh disk=2 version=0.0.9"
Expand Down

0 comments on commit 9f7e753

Please sign in to comment.