#include #include #include "zpm.h" int main(int ac, char **av){ struct zpm pkg; char hash[65]; if (ac < 3) { fprintf(stderr, "usage: db path\n"); return 1; } zpm_open(&pkg, av[1]); zpm_begin(&pkg); if (zpm_import(&pkg, av[2], 0, hash)) { zpm_commit(&pkg); fprintf(stdout, "%s\n", hash); //fprintf(stdout, "%s %s\n", hash, av[2]); } else { exit(1); } zpm_close(&pkg); return 0; }