From a2a947bd09aed223c64018650ff28dddf47b93e1 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 14 Oct 2024 15:00:10 +0200 Subject: [PATCH 1/4] Update install.sh --- src/install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/install.sh b/src/install.sh index 4d7f6da05..ac3592d8b 100644 --- a/src/install.sh +++ b/src/install.sh @@ -588,7 +588,7 @@ prepareImage() { desc=$(printVersion "$DETECTED" "$DETECTED") - ! setMachine "$DETECTED" "$iso" "$dir" "$desc" && return 1 + setMachine "$DETECTED" "$iso" "$dir" "$desc" || return 1 skipVersion "$DETECTED" && return 0 if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then @@ -815,11 +815,11 @@ updateImage() { fi if ! addDrivers "$src" "$tmp" "$wim" "$index" "$DETECTED"; then - error "Failed to add drivers to image!" && return 1 + error "Failed to add drivers to image!" fi if ! addFolder "$src"; then - error "Failed to add OEM folder to image!" && return 1 + error "Failed to add OEM folder to image!" fi if wimlib-imagex extract "$wim" "$index" "/$file" "--dest-dir=$tmp" >/dev/null 2>&1; then @@ -956,7 +956,7 @@ buildImage() { [ -s "$log" ] && error="$(<"$log")" [[ "$error" != "$hide" ]] && echo "$error" - ! mv -f "$out" "$BOOT" && return 1 + mv -f "$out" "$BOOT" || return 1 return 0 } From e933c0acb5dcc1790c27443721dff51584d10e42 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 14 Oct 2024 15:02:45 +0200 Subject: [PATCH 2/4] Update define.sh --- src/define.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/define.sh b/src/define.sh index 501b8c8ef..e496be57c 100644 --- a/src/define.sh +++ b/src/define.sh @@ -1677,7 +1677,7 @@ migrateFiles() { [[ "${version,,}" == "win7x64" ]] && file="en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso" [ ! -f "$STORAGE/$file" ] && return 0 - ! mv -f "$STORAGE/$file" "$base" && return 1 + mv -f "$STORAGE/$file" "$base" || return 1 return 0 } @@ -1996,7 +1996,7 @@ prepare2k3() { key="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY" fi - ! prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" && return 1 + prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" || return 1 return 0 } @@ -2021,7 +2021,7 @@ prepareXP() { key="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G" fi - ! prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" && return 1 + prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" || return 1 return 0 } From 1659cbba42b51835610c5764fca15c373df63b12 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 14 Oct 2024 15:04:00 +0200 Subject: [PATCH 3/4] Update mido.sh --- src/mido.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mido.sh b/src/mido.sh index 079f9f2ef..ef8015e92 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -592,7 +592,7 @@ downloadFile() { if [ "$total" -lt 100000000 ]; then error "Invalid download link: $url (is only $total bytes?). Please report this at $SUPPORT/issues." && return 1 fi - ! verifyFile "$iso" "$size" "$total" "$sum" && return 1 + verifyFile "$iso" "$size" "$total" "$sum" || return 1 html "Download finished successfully..." && return 0 fi From 0c9c8337f2f146f5e82b4291d424301ac9edf1e9 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 14 Oct 2024 15:10:07 +0200 Subject: [PATCH 4/4] Update install.sh --- src/install.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/install.sh b/src/install.sh index ac3592d8b..317083389 100644 --- a/src/install.sh +++ b/src/install.sh @@ -541,7 +541,7 @@ detectImage() { fi info=$(wimlib-imagex info -xml "$wim" | tr -d '\000') - ! checkPlatform "$info" && exit 67 + checkPlatform "$info" || exit 67 DETECTED=$(detectVersion "$info") @@ -884,7 +884,8 @@ removeImage() { [ ! -f "$iso" ] && return 0 [ -n "$CUSTOM" ] && return 0 - ! rm -f "$iso" 2> /dev/null && warn "failed to remove $iso !" + + rm -f "$iso" 2> /dev/null || warn "failed to remove $iso !" return 0 } @@ -927,20 +928,20 @@ buildImage() { if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then - ! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \ - -udf -boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -allow-limited-size -quiet "$dir" 2> "$log" && failed="y" + genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \ + -udf -boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -allow-limited-size -quiet "$dir" 2> "$log" || failed="y" else case "${DETECTED,,}" in "win2k"* | "winxp"* | "win2003"* ) - ! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -c "$cat" -iso-level 2 -J -l -D -N -joliet-long \ - -relaxed-filenames -V "${LABEL::30}" -quiet "$dir" 2> "$log" && failed="y" ;; + genisoimage -o "$out" -b "$ETFS" -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -c "$cat" -iso-level 2 -J -l -D -N -joliet-long \ + -relaxed-filenames -V "${LABEL::30}" -quiet "$dir" 2> "$log" || failed="y" ;; "win9"* ) - ! genisoimage -o "$out" -b "$ETFS" -J -r -V "${LABEL::30}" -quiet "$dir" 2> "$log" && failed="y" ;; + genisoimage -o "$out" -b "$ETFS" -J -r -V "${LABEL::30}" -quiet "$dir" 2> "$log" || failed="y" ;; * ) - ! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \ - -udf -allow-limited-size -quiet "$dir" 2> "$log" && failed="y" ;; + genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \ + -udf -allow-limited-size -quiet "$dir" 2> "$log" || failed="y" ;; esac fi