Update install.sh

This commit is contained in:
Kroese 2024-05-11 15:47:52 +02:00 committed by GitHub
parent 5869856124
commit 6107ec0111
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,12 +46,15 @@ startInstall() {
fi fi
if [ -f "$STORAGE/windows.base" ]; then local previous="$STORAGE/windows.base"
local base previous
base=$(basename $iso)
previous=$(<"$STORAGE/windows.base")
if [ -n "$previous" ]; then
if [ -f "$previous" ]; then
previous=$(<"$previous")
if [ -n "$previous" ]; then
previous="$STORAGE/$previous"
if [ -f "$previous" ]; then
rm -f "$previous" || true
fi
fi fi
fi fi
@ -132,8 +135,10 @@ finishInstall() {
cp -f /run/version "$STORAGE/windows.ver" cp -f /run/version "$STORAGE/windows.ver"
if [[ "$iso" == "$STORAGE/"* ]]; then if [[ "$iso" == "$STORAGE/"* ]]; then
base=$(basename $iso) if [[ "$aborted" != [Yy1]* ]] || [ -z "$CUSTOM" ]; then
echo "$base" > "$STORAGE/windows.base" base=$(basename $iso)
echo "$base" > "$STORAGE/windows.base"
fi
fi fi
if [[ "${PLATFORM,,}" == "x64" ]]; then if [[ "${PLATFORM,,}" == "x64" ]]; then