mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
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:
parent
a5ef8d3e21
commit
c3f556486e
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# This file is part of OpenELEC - http://www.openelec.tv
|
# This file is part of OpenELEC - http://www.openelec.tv
|
||||||
@ -50,10 +50,10 @@ if [ -z "$1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
DISK="$1"
|
DISK="$1"
|
||||||
if [ "$DISK" = "/dev/mmcblk0" ]; then
|
if [[ "$DISK" = "/dev/mmcblk"* ]]; then
|
||||||
PART1="${DISK}p1"
|
PART1="${DISK}p1"
|
||||||
PART2="${DISK}p2"
|
PART2="${DISK}p2"
|
||||||
elif [ "$DISK" = "/dev/loop0" ]; then
|
elif [[ "$DISK" = "/dev/loop"* ]]; then
|
||||||
PART1="${DISK}p1"
|
PART1="${DISK}p1"
|
||||||
PART2="${DISK}p2"
|
PART2="${DISK}p2"
|
||||||
IMGFILE="$2"
|
IMGFILE="$2"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user