summaryrefslogtreecommitdiff
path: root/src/frontend/cli/sisyphus-cli.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-06-24 21:55:37 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-06-24 21:55:37 +0100
commitf7e54cc8a29e5fa319ce21d6ec268e210397740a (patch)
tree5078d7a5f7f2393aa3b5068d980b0d3598bff878 /src/frontend/cli/sisyphus-cli.py
parent2faa4c83dbaca3958feb092c9776f016a0133e8f (diff)
write a proper Makefile, rearrange source code a bit
Diffstat (limited to 'src/frontend/cli/sisyphus-cli.py')
-rwxr-xr-xsrc/frontend/cli/sisyphus-cli.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py
new file mode 100755
index 0000000..3d4fb3a
--- /dev/null
+++ b/src/frontend/cli/sisyphus-cli.py
@@ -0,0 +1,33 @@
+#!/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()