X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-script.c;h=8018849b36c450b1f00db39657557e658877b8ea;hb=b14d452ddce90289441c07447d4d4a27821a5ce3;hp=a91f2ac3195974c030a0fc5b28c9645e319feaf6;hpb=c02e8d831122a804f675a2f106b2e23af235be58;p=zpackage diff --git a/zpm-script.c b/zpm-script.c index a91f2ac..8018849 100644 --- a/zpm-script.c +++ b/zpm-script.c @@ -26,7 +26,7 @@ */ void usage(void) { - fprintf(stderr, "usage: db hash file\n"); + fprintf(stderr, "usage: zpm script ...\n"); } int setdir(char *rootdir) { @@ -183,7 +183,7 @@ int main(int ac, char **av){ 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(); @@ -259,7 +259,9 @@ int main(int ac, char **av){ } 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 = "-";