]> pd.if.org Git - zpackage/commitdiff
add new db init program
authorNathan Wagner <nw@hydaspes.if.org>
Sun, 25 Sep 2016 08:56:31 +0000 (03:56 -0500)
committerNathan Wagner <nw@hydaspes.if.org>
Sun, 25 Sep 2016 08:56:31 +0000 (03:56 -0500)
.gitignore
zpm-init.c [new file with mode: 0644]

index dd808ecfac182b04918cc2db2f60c708f8fb135d..f8427b74a6a69ac468506c510388752089cd7fe0 100644 (file)
@@ -3,6 +3,7 @@ elftype
 *.a
 zpm-addfile
 zpm-extract
+zpm-init
 uncompress
 *.zpm
 *.db
diff --git a/zpm-init.c b/zpm-init.c
new file mode 100644 (file)
index 0000000..ad92bc6
--- /dev/null
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include "zpm.h"
+
+int main(int ac, char **av){
+       struct zpm pkg;
+
+       if (ac < 2) {
+               fprintf(stderr, "usage: path\n");
+               return 1;
+       }
+       zpm_open(&pkg, av[1]);
+       zpm_close(&pkg);
+       return 0;
+}