mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 12:15:50 +00:00
Update install.sh
This commit is contained in:
parent
5af74a709c
commit
99ba0edf79
1 changed files with 20 additions and 12 deletions
|
|
@ -72,9 +72,9 @@ startInstall() {
|
||||||
if [ -z "$CUSTOM" ]; then
|
if [ -z "$CUSTOM" ]; then
|
||||||
rm -f "$ISO"
|
rm -f "$ISO"
|
||||||
else
|
else
|
||||||
if [[ "$ISO" != "$CUSTOM_ORG" ]]; then
|
if [ -n "$ORIGINAL" ]; then
|
||||||
rm -f "$ISO"
|
rm -f "$ISO"
|
||||||
ISO="$CUSTOM_ORG"
|
ISO="$ORIGINAL"
|
||||||
CUSTOM="$ISO"
|
CUSTOM="$ISO"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
@ -145,11 +145,14 @@ abortInstall() {
|
||||||
|
|
||||||
[[ "${iso,,}" == *".esd" ]] && exit 60
|
[[ "${iso,,}" == *".esd" ]] && exit 60
|
||||||
|
|
||||||
[ -n "$CUSTOM" ] && BOOT="$iso"
|
if [ -n "$CUSTOM" ]; then
|
||||||
|
BOOT="$iso"
|
||||||
if [[ "$iso" != "$BOOT" ]]; then
|
REMOVE="N"
|
||||||
if ! mv -f "$iso" "$BOOT"; then
|
else
|
||||||
error "Failed to move ISO file: $iso" && return 1
|
if [[ "$iso" != "$BOOT" ]]; then
|
||||||
|
if ! mv -f "$iso" "$BOOT"; then
|
||||||
|
error "Failed to move ISO file: $iso" && return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -163,7 +166,7 @@ detectCustom() {
|
||||||
local size base
|
local size base
|
||||||
|
|
||||||
CUSTOM=""
|
CUSTOM=""
|
||||||
CUSTOM_ORG=""
|
ORIGINAL=""
|
||||||
|
|
||||||
if [[ "${VERSION,,}" != "http"* ]]; then
|
if [[ "${VERSION,,}" != "http"* ]]; then
|
||||||
base="${VERSION/\/storage\//}"
|
base="${VERSION/\/storage\//}"
|
||||||
|
|
@ -186,12 +189,17 @@ detectCustom() {
|
||||||
size="$(stat -c%s "$file")"
|
size="$(stat -c%s "$file")"
|
||||||
[ -z "$size" ] || [[ "$size" == "0" ]] && return 0
|
[ -z "$size" ] || [[ "$size" == "0" ]] && return 0
|
||||||
|
|
||||||
CUSTOM_ORG="$file"
|
|
||||||
|
|
||||||
base="$STORAGE/windows.$size.iso"
|
base="$STORAGE/windows.$size.iso"
|
||||||
[ -f "$base" ] && [ -s "$base" ] && file="$base"
|
|
||||||
|
|
||||||
CUSTOM="$file"
|
if [ -f "$base" ] && [ -s "$base" ]; then
|
||||||
|
CUSTOM="$base"
|
||||||
|
ORIGINAL="$file"
|
||||||
|
else
|
||||||
|
REMOVE="N"
|
||||||
|
CUSTOM="$file"
|
||||||
|
rm -f "$base"
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue