add usage message to foreach-path
fix path for local database
+ if (!zpm || zpm->error || !pkgid || !callback) return 0;
+
sql = sqlite3_mprintf(files, pkgid);
if (!sql) {
return 0;
sql = sqlite3_mprintf(files, pkgid);
if (!sql) {
return 0;
zpm->error = 2;
return 0;
}
zpm->error = 2;
return 0;
}
- printf("usage: ...\n");
+ printf("usage: zpm foreach-path [-fncC] args ...\n");
}
static int run_program(void *f, int ncols, char **vals, char **cols) {
}
static int run_program(void *f, int ncols, char **vals, char **cols) {
- 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;
if ((s = getenv("ZPMDB"))) {
/* TODO does this need to be copied ? */
conf.dbfile = s;
argn++;
} else {
fprintf(stderr, "must specify pkgid\n");
argn++;
} else {
fprintf(stderr, "must specify pkgid\n");