summaryrefslogtreecommitdiff
path: root/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'actions.c')
-rw-r--r--actions.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/actions.c b/actions.c
new file mode 100644
index 0000000..661587d
--- /dev/null
+++ b/actions.c
@@ -0,0 +1,40 @@
+#include "actions.h"
+
+void actions(char action)
+{
+ int os = detectOsType();
+ switch (action)
+ {
+ case 'c':
+ clean(os);
+ break;
+
+ case 'h':
+ help();
+ break;
+
+ case 'i':
+ installPackage(os);
+ break;
+
+ case 'q':
+ queryPackage(os);
+ break;
+
+ case 'r':
+ removePackage(os);
+ break;
+
+ case 's':
+ searchPackage(os);
+ break;
+
+ case 'u':
+ updatePackage(os);
+ break;
+
+ default:
+ puts("Command not found");
+ help();
+ }
+}