Update install.py

This commit is contained in:
2025-10-15 20:06:19 +00:00
parent cdb882462a
commit 472218f33e

View File

@@ -1,22 +1,23 @@
import os
import sys
import platform
is_linux = false
is_macos = false
is_windows = false
def check_os():
"""Checks the operating system and prints a message accordingly."""
os_type = platform.uname().sysname.lower()
os_type = os.uname().sysname.lower()
is_linux = os_type == "linux"
is_macos = os_type == "darwin"
is_windows = os_type == "windows"
if os_type == "linux":
print("Running on Linux")
elif os_type == "darwin":
print("Running on macOS")
if is_linux or is_macos or is_windows:
print(f"Running on {os_type}")
else:
print(f"Unsupported OS family: {os_type}")
return 1 # Indicate an error
return 0 # Indicate success
exit(1)
if __name__ == "__main__":
exit_code = check_os()
sys.exit(exit_code)
check_os()