Update install.sh

This commit is contained in:
Kroese 2024-01-22 16:58:36 +01:00 committed by GitHub
parent 57a3585552
commit 781aa18d07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,15 +39,33 @@ if [[ "${VERSION,,}" == "tiny11" ]]; then
VERSION="https://archive.org/download/tiny-11-core-x-64-beta-1/tiny11%20core%20x64%20beta%201.iso"
fi
CUSTOM="custom.iso"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.iso"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.ISO"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.ISO"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.img"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.img"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.IMG"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.IMG"
MSG="Windows is being started, please wait..."
if [ -f "$STORAGE/$CUSTOM" ]; then
EXTERNAL="N"
BASE="$CUSTOM"
else
CUSTOM=""
if [[ "${VERSION,,}" == "http"* ]]; then
EXTERNAL="Y"
else
EXTERNAL="N"
fi
TMP="$STORAGE/tmp"
MSG="Windows is being started, please wait..."
if [[ "$EXTERNAL" != [Yy1]* ]]; then
BASE="$VERSION.iso"
@ -70,23 +88,11 @@ fi
[[ "${BASE,,}" == "custom."* ]] && BASE="target.iso"
html "$MSG"
CUSTOM="custom.iso"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.iso"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.ISO"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.ISO"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.img"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.img"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.IMG"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.IMG"
if [ -f "$STORAGE/$CUSTOM" ]; then
BASE="$CUSTOM"
else
CUSTOM=""
fi
html "$MSG"
TMP="$STORAGE/tmp"
if [ -f "$STORAGE/$BASE" ]; then
# Check if the ISO was already processed by our script
@ -99,7 +105,8 @@ if [ -f "$STORAGE/$BASE" ]; then
fi
CUSTOM="$BASE"
info "Custom ISO file '$BASE' needs to be prepared..."
MSG="ISO file '$BASE' needs to be prepared..."
info "$MSG" && html "$MSG"
fi
@ -158,7 +165,7 @@ if (( SIZE > SPACE )); then
fi
if [ -n "$CUSTOM" ]; then
MSG="Extracting custom ISO image..."
MSG="Extracting local ISO image..."
else
MSG="Extracting downloaded ISO image..."
fi