Update install.sh

This commit is contained in:
Kroese 2024-05-05 20:55:35 +02:00 committed by GitHub
parent afd3c867be
commit c777beb001
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,29 +70,28 @@ startInstall() {
fi fi
if [ -z "$CUSTOM" ]; then if [ -z "$CUSTOM" ]; then
rm -f "$ISO"
BOOT="$ISO"
ISO=$(basename "$ISO")
ISO="$TMP/$ISO"
else else
if [ -n "$ORIGINAL" ]; then if [ -n "$ORIGINAL" ]; then
rm -f "$ISO" rm -f "$ISO"
ISO="$ORIGINAL" ISO="$ORIGINAL"
CUSTOM="$ISO" CUSTOM="$ISO"
fi fi
fi
rm -rf "$TMP"
mkdir -p "$TMP"
if [ -n "$CUSTOM" ]; then
local size local size
size="$(stat -c%s "$ISO")" size="$(stat -c%s "$ISO")"
BOOT="$STORAGE/windows.$size.iso" BOOT="$STORAGE/windows.$size.iso"
else
BOOT="$ISO"
ISO=$(basename "$ISO")
ISO="$TMP/$ISO"
fi fi
rm -f "$BOOT" rm -f "$BOOT"
rm -rf "$TMP"
mkdir -p "$TMP"
return 0 return 0
} }
@ -195,7 +194,6 @@ detectCustom() {
CUSTOM="$base" CUSTOM="$base"
ORIGINAL="$file" ORIGINAL="$file"
else else
REMOVE="N"
CUSTOM="$file" CUSTOM="$file"
rm -f "$base" rm -f "$base"
fi fi