summaryrefslogtreecommitdiff
path: root/src/frontend/cli/sisyphus-cli.py
blob: c6d3e3c0d8cfaa4d5e5c3661abaa4fbd6a1e6df0 (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
#!/usr/bin/python3

import sys
from libsisyphus import *

check_system_mode()

PKGLIST = sys.argv[2:]

if "__main__" == __name__:
    if "install" in sys.argv[1:]:
        sisyphus_pkg_install(PKGLIST)
    elif "uninstall" in sys.argv[1:]:
        sisyphus_pkg_uninstall(PKGLIST)
    elif "force-uninstall" in sys.argv[1:]:
        sisyphus_pkg_force_uninstall(PKGLIST)
    elif "remove-orphans" in sys.argv[1:]:
        sisyphus_pkg_remove_orphans()
    elif "upgrade" in sys.argv[1:]:
        sisyphus_pkg_system_upgrade()
    elif "search" in sys.argv[1:]:
        sisyphus_pkg_search(PKGLIST)
    elif "update" in sys.argv[1:]:
        sisyphus_pkg_system_update()
    elif "spmsync" in sys.argv[1:]:
        sisyphus_pkg_spmsync()
    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()