aboutsummaryrefslogtreecommitdiff
path: root/src/update_all.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/update_all.c')
-rw-r--r--src/update_all.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/update_all.c b/src/update_all.c
new file mode 100644
index 0000000..1018f65
--- /dev/null
+++ b/src/update_all.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "update_all.h"
+#include "create_pkg.h"
+#include "update_pkg.h"
+#include "lua_state.h"
+
+void update_all() {
+ init_lua_state();
+ cache_repos();
+ for (size_t i = 0; i < cached_repos_count; i++) {
+ Pkg pkg = create_pkg(cached_repos[i].source_value, "default");
+ update_pkg(pkg);
+ }
+} \ No newline at end of file