mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 11:25:49 +00:00
fix: Simplify conditional checks
This commit is contained in:
parent
bfc9b357e5
commit
9e9e7b5c48
1 changed files with 5 additions and 5 deletions
|
|
@ -1269,7 +1269,7 @@ getValue() {
|
||||||
local type="$4"
|
local type="$4"
|
||||||
local func="getLink$1"
|
local func="getLink$1"
|
||||||
|
|
||||||
if [ "$1" -gt 0 ] && [ "$1" -le "$MIRRORS" ]; then
|
if [ "$1" -gt 0 && "$1" -le "$MIRRORS" ]; then
|
||||||
val=$($func "$id" "$lang" "$type")
|
val=$($func "$id" "$lang" "$type")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1394,7 +1394,7 @@ prepareInstall() {
|
||||||
|
|
||||||
ETFS="[BOOT]/Boot-NoEmul.img"
|
ETFS="[BOOT]/Boot-NoEmul.img"
|
||||||
|
|
||||||
if [ ! -f "$dir/$ETFS" ] || [ ! -s "$dir/$ETFS" ]; then
|
if [ ! -f "$dir/$ETFS" || ! -s "$dir/$ETFS" ]; then
|
||||||
error "Failed to locate file \"$ETFS\" in $desc ISO image!" && return 1
|
error "Failed to locate file \"$ETFS\" in $desc ISO image!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1478,7 +1478,7 @@ prepareInstall() {
|
||||||
local key setup
|
local key setup
|
||||||
setup=$(find "$target" -maxdepth 1 -type f -iname setupp.ini -print -quit)
|
setup=$(find "$target" -maxdepth 1 -type f -iname setupp.ini -print -quit)
|
||||||
|
|
||||||
if [ -n "$setup" ] && [ -z "$KEY" ]; then
|
if [ -n "$setup" & -z "$KEY" ]; then
|
||||||
|
|
||||||
pid=$(<"$setup")
|
pid=$(<"$setup")
|
||||||
pid="${pid%$'\r'}"
|
pid="${pid%$'\r'}"
|
||||||
|
|
@ -1795,7 +1795,7 @@ prepareLegacy() {
|
||||||
|
|
||||||
ETFS="boot.img"
|
ETFS="boot.img"
|
||||||
|
|
||||||
[ -f "$dir/$ETFS" ] && [ -s "$dir/$ETFS" ] && return 0
|
[ -f "$dir/$ETFS" && -s "$dir/$ETFS" ] && return 0
|
||||||
rm -f "$dir/$ETFS"
|
rm -f "$dir/$ETFS"
|
||||||
|
|
||||||
local len offset
|
local len offset
|
||||||
|
|
@ -1806,7 +1806,7 @@ prepareLegacy() {
|
||||||
error "Failed to extract boot image from $desc ISO!" && return 1
|
error "Failed to extract boot image from $desc ISO!" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f "$dir/$ETFS" ] && [ -s "$dir/$ETFS" ] && return 0
|
[ -f "$dir/$ETFS" && -s "$dir/$ETFS" ] && return 0
|
||||||
|
|
||||||
error "Failed to locate file \"$ETFS\" in $desc ISO image!"
|
error "Failed to locate file \"$ETFS\" in $desc ISO image!"
|
||||||
return 1
|
return 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue