summaryrefslogtreecommitdiff
path: root/src/frontend/cli/sisyphus-cli.py
blob: c99f86a4034ecce68e5bdd19164a22e23eca1bf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/python3

import sys
import subprocess
from libsisyphus import *

check_if_srcmode()

if "__main__" == __name__:
    if "install" in sys.argv[1:]:
        sisyphus_pkg_install()
    elif "uninstall" in sys.argv[1:]:
        sisyphus_pkg_uninstall()
    elif "force-uninstall" in sys.argv[1:]:
        sisyphus_pkg_force_uninstall()
    elif "remove-orphans" in sys.argv[1:]:
        sisyphus_pkg_remove_orphans()
    elif "upgrade" in sys.argv[1:]:
        sisyphus_pkg_system_upgrade()
    elif "auto-install" in sys.argv[1:]:
        sisyphus_pkg_auto_install()
    elif "auto-uninstall" in sys.argv[1:]:
        sisyphus_pkg_auto_uninstall()
    elif "auto-force-uninstall" in sys.argv[1:]:
        sisyphus_pkg_auto_force_uninstall()
    elif "auto-remove-orphans" in sys.argv[1:]:
        sisyphus_pkg_auto_remove_orphans()
    elif "auto-upgrade" in sys.argv[1:]:
        sisyphus_pkg_auto_system_upgrade()
    elif "search" in sys.argv[1:]:
        sisyphus_pkg_search()
    elif "update" in sys.argv[1:]:
        sisyphus_pkg_system_update()
    elif "belongs" in sys.argv[1:]:
        sisyphus_pkg_belongs()
    elif "depends" in sys.argv[1:]:
        sisyphus_pkg_depends()
    elif "files" in sys.argv[1:]:
        sisyphus_pkg_files()
    elif "sysinfo" in sys.argv[1:]:
        sisyphus_pkg_sysinfo()
    elif "help" in sys.argv[1:]:
        sisyphus_pkg_help()
    elif not sys.argv[1:]:
        sisyphus_pkg_help()