Skip to content

Commit 69b4502

Browse files
authored
fix: Continue without drivers (#809)
1 parent b347232 commit 69b4502

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

src/define.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,7 @@ migrateFiles() {
16771677
[[ "${version,,}" == "win7x64" ]] && file="en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso"
16781678

16791679
[ ! -f "$STORAGE/$file" ] && return 0
1680-
! mv -f "$STORAGE/$file" "$base" && return 1
1680+
mv -f "$STORAGE/$file" "$base" || return 1
16811681

16821682
return 0
16831683
}
@@ -1996,7 +1996,7 @@ prepare2k3() {
19961996
key="P4WJG-WK3W7-3HM8W-RWHCK-8JTRY"
19971997
fi
19981998

1999-
! prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" && return 1
1999+
prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" || return 1
20002000

20012001
return 0
20022002
}
@@ -2021,7 +2021,7 @@ prepareXP() {
20212021
key="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
20222022
fi
20232023

2024-
! prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" && return 1
2024+
prepareInstall "$iso" "$dir" "$desc" "$arch" "$key" "$driver" || return 1
20252025

20262026
return 0
20272027
}

src/install.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ detectImage() {
541541
fi
542542

543543
info=$(wimlib-imagex info -xml "$wim" | tr -d '\000')
544-
! checkPlatform "$info" && exit 67
544+
checkPlatform "$info" || exit 67
545545

546546
DETECTED=$(detectVersion "$info")
547547

@@ -588,7 +588,7 @@ prepareImage() {
588588

589589
desc=$(printVersion "$DETECTED" "$DETECTED")
590590

591-
! setMachine "$DETECTED" "$iso" "$dir" "$desc" && return 1
591+
setMachine "$DETECTED" "$iso" "$dir" "$desc" || return 1
592592
skipVersion "$DETECTED" && return 0
593593

594594
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
@@ -815,11 +815,11 @@ updateImage() {
815815
fi
816816

817817
if ! addDrivers "$src" "$tmp" "$wim" "$index" "$DETECTED"; then
818-
error "Failed to add drivers to image!" && return 1
818+
error "Failed to add drivers to image!"
819819
fi
820820

821821
if ! addFolder "$src"; then
822-
error "Failed to add OEM folder to image!" && return 1
822+
error "Failed to add OEM folder to image!"
823823
fi
824824

825825
if wimlib-imagex extract "$wim" "$index" "/$file" "--dest-dir=$tmp" >/dev/null 2>&1; then
@@ -884,7 +884,8 @@ removeImage() {
884884

885885
[ ! -f "$iso" ] && return 0
886886
[ -n "$CUSTOM" ] && return 0
887-
! rm -f "$iso" 2> /dev/null && warn "failed to remove $iso !"
887+
888+
rm -f "$iso" 2> /dev/null || warn "failed to remove $iso !"
888889

889890
return 0
890891
}
@@ -927,20 +928,20 @@ buildImage() {
927928

928929
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
929930

930-
! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \
931-
-udf -boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -allow-limited-size -quiet "$dir" 2> "$log" && failed="y"
931+
genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \
932+
-udf -boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -allow-limited-size -quiet "$dir" 2> "$log" || failed="y"
932933

933934
else
934935

935936
case "${DETECTED,,}" in
936937
"win2k"* | "winxp"* | "win2003"* )
937-
! 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 \
938-
-relaxed-filenames -V "${LABEL::30}" -quiet "$dir" 2> "$log" && failed="y" ;;
938+
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 \
939+
-relaxed-filenames -V "${LABEL::30}" -quiet "$dir" 2> "$log" || failed="y" ;;
939940
"win9"* )
940-
! genisoimage -o "$out" -b "$ETFS" -J -r -V "${LABEL::30}" -quiet "$dir" 2> "$log" && failed="y" ;;
941+
genisoimage -o "$out" -b "$ETFS" -J -r -V "${LABEL::30}" -quiet "$dir" 2> "$log" || failed="y" ;;
941942
* )
942-
! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \
943-
-udf -allow-limited-size -quiet "$dir" 2> "$log" && failed="y" ;;
943+
genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "${LABEL::30}" \
944+
-udf -allow-limited-size -quiet "$dir" 2> "$log" || failed="y" ;;
944945
esac
945946

946947
fi
@@ -956,7 +957,7 @@ buildImage() {
956957
[ -s "$log" ] && error="$(<"$log")"
957958
[[ "$error" != "$hide" ]] && echo "$error"
958959

959-
! mv -f "$out" "$BOOT" && return 1
960+
mv -f "$out" "$BOOT" || return 1
960961
return 0
961962
}
962963

src/mido.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ downloadFile() {
592592
if [ "$total" -lt 100000000 ]; then
593593
error "Invalid download link: $url (is only $total bytes?). Please report this at $SUPPORT/issues." && return 1
594594
fi
595-
! verifyFile "$iso" "$size" "$total" "$sum" && return 1
595+
verifyFile "$iso" "$size" "$total" "$sum" || return 1
596596
html "Download finished successfully..." && return 0
597597
fi
598598

0 commit comments

Comments
 (0)