mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Replaced if with case
Because bash is the devil ;)
This commit is contained in:
parent
c3f556486e
commit
76cc529617
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
@ -50,18 +50,19 @@ if [ -z "$1" ]; then
|
||||
fi
|
||||
|
||||
DISK="$1"
|
||||
if [[ "$DISK" = "/dev/mmcblk"* ]]; then
|
||||
PART1="${DISK}p1"
|
||||
PART2="${DISK}p2"
|
||||
elif [[ "$DISK" = "/dev/loop"* ]]; then
|
||||
PART1="${DISK}p1"
|
||||
PART2="${DISK}p2"
|
||||
IMGFILE="$2"
|
||||
losetup $DISK $IMGFILE
|
||||
else
|
||||
PART1="${DISK}1"
|
||||
PART2="${DISK}2"
|
||||
fi
|
||||
case $DISK in
|
||||
"/dev/mmcblk1"*)
|
||||
PART1="${DISK}p1";
|
||||
PART2="${DISK}p2";;
|
||||
"/dev/loop"*)
|
||||
PART1="${DISK}p1";
|
||||
PART2="${DISK}p2";
|
||||
IMGFILE="$2";
|
||||
losetup $DISK $IMGFILE;;
|
||||
*)
|
||||
PART1="${DISK}1";
|
||||
PART2="${DISK}2";;
|
||||
esac
|
||||
|
||||
clear
|
||||
echo "#########################################################"
|
||||
|
Loading…
x
Reference in New Issue
Block a user