diff --git a/install.py b/install.py index 88d820d..e1fc9f3 100644 --- a/install.py +++ b/install.py @@ -11,9 +11,16 @@ def checking(): return False if platform.system() == "Linux": - if not checking(): - launch.run("apt update && apt -y install -qq aria2", "Installing requirements for Model Downloader") - else: + if not checking(): + # check platform.freedesktop_os_release() to try and detect with distribution the user is using + platform_info = platform.freedesktop_os_release() + # if ID contain arch Arch endeavouros manjaro artix use pacman + if "arch" in platform_info["ID"] or "endeavouros" in platform_info["ID"] or "manjaro" in platform_info[ + "ID"] or "artix" in platform_info["ID"] or "arch" in platform_info["ID_LIKE"]: + launch.run("sudo pacman -S aria2", "Installing requirements for Model Downloader") + else: + launch.run("apt update && apt -y install -qq aria2", "Installing requirements for Model Downloader") + else: pass elif platform.system() == "Darwin": if not checking():