};
static void usage() {
- printf("usage: ...\n");
+ printf("usage: zpm foreach-path [-fncC] args ...\n");
}
static int run_program(void *f, int ncols, char **vals, char **cols) {
char *s;
int opt;
- struct config conf = { "/var/lib/db.zpm", 0, 0, 0, "", 0, 0, printpaths
+ struct config conf = { "/var/lib/zpm/local.db", 0, 0, 0, "", 0, 0, printpaths
};
-
if ((s = getenv("ZPMDB"))) {
/* TODO does this need to be copied ? */
conf.dbfile = s;
argn++;
} else {
fprintf(stderr, "must specify pkgid\n");
+ usage();
exit(EXIT_FAILURE);
}