Add install.py
This commit is contained in:
21
install.py
Normal file
21
install.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
def check_os():
|
||||||
|
"""Checks the operating system and prints a message accordingly."""
|
||||||
|
|
||||||
|
os_type = os.uname().system.lower() # Get OS name, lowercase for consistency
|
||||||
|
|
||||||
|
if os_type == "linux":
|
||||||
|
print("Running on Linux")
|
||||||
|
elif os_type == "darwin":
|
||||||
|
print("Running on macOS")
|
||||||
|
else:
|
||||||
|
print(f"Unsupported OS family: {os_type}")
|
||||||
|
return 1 # Indicate an error
|
||||||
|
|
||||||
|
return 0 # Indicate success
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
exit_code = check_os()
|
||||||
|
sys.exit(exit_code)
|
||||||
Reference in New Issue
Block a user