Added wildcard to mmcblk/loop if statement

This wound me up no end until I realised it was only checking for mmcblk0. My chromebook has mmcblk0 in use so the sd card was showing up as mmcblk1. It's also not inconceivable for people to have more than one SD card plugged in at once.
This commit is contained in:
James Belchamber 2013-08-17 23:22:42 +01:00
parent a5ef8d3e21
commit c3f556486e

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
@ -50,10 +50,10 @@ if [ -z "$1" ]; then
fi
DISK="$1"
if [ "$DISK" = "/dev/mmcblk0" ]; then
if [[ "$DISK" = "/dev/mmcblk"* ]]; then
PART1="${DISK}p1"
PART2="${DISK}p2"
elif [ "$DISK" = "/dev/loop0" ]; then
elif [[ "$DISK" = "/dev/loop"* ]]; then
PART1="${DISK}p1"
PART2="${DISK}p2"
IMGFILE="$2"