1 #define _POSIX_C_SOURCE 2
13 fprintf(stderr, "zpm-findpkg [-I] [-s <status> ...] [-S <status>] [package]\n");
16 int main(int ac, char **av){
23 dbfile = getenv("ZPMDB");
25 dbfile = "/var/lib/zpm/local.db";
28 while ((opt = getopt(ac, av, "f:s")) != -1) {
30 case 'f': dbfile = optarg; break;
31 case 's': set = 1; break;
41 fprintf(stderr, "must specify db\n");
45 char *pkgid = av[argn];
46 char hash[ZPM_HASH_STRLEN+1];
48 if (zpm_open(&pkg, dbfile)) {
50 found = zpm_package_sethash(&pkg, pkgid, hash);
52 found = zpm_package_hash(&pkg, pkgid, hash);