Update install.py

This commit is contained in:
2025-10-17 20:15:58 +00:00
parent 526c9b9d79
commit da6b6e2133

View File

@@ -1,6 +1,10 @@
import os
import platform
linux_packages = [
'zsh'
]
os_type = platform.uname().system.lower()
is_linux = os_type == "linux"
@@ -19,4 +23,13 @@ def check_os():
if __name__ == "__main__":
check_os()
if is_debian:
os.system('apt-get update && apt-get upgrade -y')
for p in linux_packages:
os.system(f'apt-get install {p} -y')
if is_rhel:
os.system('dnf upgrade -y')
for p in linux_packages:
os.system(f'dnf install {p} -y')
print(f'is_windows: {is_windows}, is_macos: {is_macos}, is_linux: {is_linux}, is_debian: {is_debian}, is_rhel: {is_rhel}')