mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-18 13:20:00 +10:00
sys_patch.py: Add additional preflight checks
This commit is contained in:
+11
-1
@@ -34,4 +34,14 @@ class os_conversion:
|
||||
if kernel >= os_data.big_sur:
|
||||
return str((kernel - 9))
|
||||
else:
|
||||
return str((f"10.{kernel - 4}"))
|
||||
return str((f"10.{kernel - 4}"))
|
||||
|
||||
def is_os_newer(source_major, source_minor, target_major, target_minor):
|
||||
# Check if OS version 1 is newer than OS version 2
|
||||
if source_major < target_major:
|
||||
return True
|
||||
elif source_major == target_major:
|
||||
if source_minor < target_minor:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
Reference in New Issue
Block a user