*/
void usage(void) {
- fprintf(stderr, "usage: db hash file\n");
+ fprintf(stderr, "usage: zpm script ...\n");
}
int setdir(char *rootdir) {
case 'h': scriptishash = 1; break;
case 'o': output = optarg; break;
case 'S': script = optarg; break;
- case 'q': quiet = 1;
+ case 'q': quiet = 1; break;
default:
usage();
} else if (!zpm_script_hash(&zpm, pkgid, phase, hash)) {
fail = SOFT;
} else if (scriptishash) {
- printf("%s\n", hash);
+ if (!quiet) {
+ printf("%s\n", hash);
+ }
} else {
if (!output) {
output = "-";