Skip to content

Commit

Permalink
fix for #532
Browse files Browse the repository at this point in the history
  • Loading branch information
grahampugh committed Nov 14, 2024
1 parent ce1bd05 commit 7dae27f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ No date

- `--update` and `--overwrite` options will now function when an invalid installer is present on the device (addresses #529).
- Filtered the mist list search to the prechosen OS, version or build and added a check to see that there is a version of the prechosen OS that is compatible with the system. Prevents downloading e.g. 15.1 on a 15.2 beta system when `--os 15` is chosen (addresses #534).
- Fixed checks for newer packages (addresses #532).

## [36.0]

Expand Down
22 changes: 12 additions & 10 deletions erase-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -593,20 +593,26 @@ check_newer_available() {
if [[ "$available_build" ]]; then
if [[ $installer_pkg_build ]]; then
echo "Comparing latest build found ($available_build) with cached pkg installer build ($installer_pkg_build)"
if ! is-at-least "$available_build" "$installer_pkg_build"; then
newer_build_found="yes"
fi
else
echo "Comparing latest build found ($available_build) with cached installer build ($installer_build)"
fi
if ! is-at-least "$available_build" "$installer_build"; then
newer_build_found="yes"
if ! is-at-least "$available_build" "$installer_build"; then
newer_build_found="yes"
fi
fi
fi
if [[ $newer_build_found == "yes" ]]; then
writelog "[check_newer_available] Newer installer found."
do_overwrite_existing_installer=1
else
writelog "[check_newer_available] No newer builds found"
fi
else
writelog "[check_newer_available] ERROR reading output from mist, cannot continue"
exit 1
fi
if [[ "$newer_build_found" == "no" ]]; then
writelog "[check_newer_available] No newer builds found"
fi
else
writelog "[check_newer_available] ERROR running mist, cannot continue"
exit 1
Expand Down Expand Up @@ -3136,10 +3142,6 @@ if [[ $update_installer == "yes" && "$installer_build" && $do_overwrite_existing
if [[ -d "$working_macos_app" || -f "$working_installer_pkg" ]]; then
writelog "[$script_name] Checking for newer installer"
check_newer_available
if [[ $newer_build_found == "yes" ]]; then
writelog "[$script_name] Newer installer found."
do_overwrite_existing_installer=1
fi
fi
fi

Expand Down

0 comments on commit 7dae27f

Please sign in to comment.