tDisplay version in verbose mode only in inspect_system() - pm - barely a pack manager
(HTM) git clone git://z3bra.org/pm
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit bbfee43d53ebc2ace9c41c80b6dc30ac3e91b5c6
(DIR) parent 107ce0e3e0cd0fe71ba49bbe508f3dc393824a96
(HTM) Author: z3bra <contactatz3bradotorg>
Date: Tue, 30 Oct 2018 20:25:53 +0100
Display version in verbose mode only in inspect_system()
Diffstat:
M pm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/pm.c b/pm.c
t@@ -608,7 +608,10 @@ inspect_system(int fd, const char *datadir)
while ((p = readdir(d)))
if (p->d_name[0] != '.') {
inspect_version(datadir, p->d_name, ver);
- dprintf(fd, "%s\t%s\n", p->d_name, ver);
+ dprintf(fd, "%s", p->d_name);
+ if (verbose)
+ dprintf(fd, "\t%s", ver);
+ write(fd, "\n", 1);
}
closedir(d);