aboutsummaryrefslogtreecommitdiff
path: root/src/declare.c
diff options
context:
space:
mode:
authordacctal <dacctal@symlinx.net>2026-05-25 06:39:29 +0000
committerdacctal <dacctal@symlinx.net>2026-05-25 06:39:29 +0000
commit2dea5bc2ad4281042758f0e9bfe98fa96bc89412 (patch)
tree325a53d3e82459b91a03e167fc8d32bc1c9f90ec /src/declare.c
parentcb7e87a7889c8ee3f33db43dc2f5653385dc9e29 (diff)
declarative package management
Diffstat (limited to 'src/declare.c')
-rw-r--r--src/declare.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/declare.c b/src/declare.c
new file mode 100644
index 0000000..2ba42fb
--- /dev/null
+++ b/src/declare.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "declare.h"
+#include "create_pkg.h"
+#include "update_pkg.h"
+#include "lua_state.h"
+
+void declare() {
+ 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);
+ }
+}