pm

barely a pack manager
git clone git://z3bra.org/pm
Log | Files | Refs | README | LICENSE

commit 7f7c044bcd9ba084b1b40b31e32efa4ff03ca72e
parent 9971c62e398790939966c62bb1af1fa98fc5c4c2
Author: z3bra <willyatmailoodotorg>
Date:   Sun Apr 24 20:32:40 +0200

Simplify reading arguments or stdin

Diffstat:
pm.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pm.c b/pm.c @@ -761,8 +761,7 @@ main (int argc, char **argv) case ACTION_UPDATE: case ACTION_DELETE: /* These action require a read from stdin if no arg is given */ - while ((argc>0 && (n=strdup(*argv++))!=NULL) || (n=slurp(0))!=NULL) { - + while ((n = (argc > 0) ? *argv ? strdup(*argv++) : NULL : slurp(0))) { if (action == ACTION_INSTALL) r += install(rootfs, datadir, n); if (action == ACTION_UPDATE)