From 6107ec0111546fa358a35136b6f5037849097e1e Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 11 May 2024 15:47:52 +0200 Subject: [PATCH] Update install.sh --- src/install.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/install.sh b/src/install.sh index 92c23eb..14faa9a 100644 --- a/src/install.sh +++ b/src/install.sh @@ -46,12 +46,15 @@ startInstall() { fi - if [ -f "$STORAGE/windows.base" ]; then - local base previous - base=$(basename $iso) - previous=$(<"$STORAGE/windows.base") - if [ -n "$previous" ]; then + local previous="$STORAGE/windows.base" + if [ -f "$previous" ]; then + previous=$(<"$previous") + if [ -n "$previous" ]; then + previous="$STORAGE/$previous" + if [ -f "$previous" ]; then + rm -f "$previous" || true + fi fi fi @@ -132,8 +135,10 @@ finishInstall() { cp -f /run/version "$STORAGE/windows.ver" if [[ "$iso" == "$STORAGE/"* ]]; then - base=$(basename $iso) - echo "$base" > "$STORAGE/windows.base" + if [[ "$aborted" != [Yy1]* ]] || [ -z "$CUSTOM" ]; then + base=$(basename $iso) + echo "$base" > "$STORAGE/windows.base" + fi fi if [[ "${PLATFORM,,}" == "x64" ]]; then