From: Francois Fleuret Date: Fri, 5 Mar 2010 07:03:32 +0000 (+0100) Subject: Added the information from uname in the help. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=738d132c6e601db89e688bbf54ab028e27660554;p=dus.git Added the information from uname in the help. --- diff --git a/Makefile b/Makefile index d147886..fc4b561 100644 --- a/Makefile +++ b/Makefile @@ -26,13 +26,15 @@ MAN_PATH = /usr/share/man/man1 LDFLAGS= +UNAME=\"$(shell uname -srmn)\" + ifeq ($(DEBUG),yes) OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer else OPTIMIZE_FLAG = -O2 endif -CFLAGS = -Wall -ansi -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(OPTIMIZE_FLAG) +CFLAGS = -Wall -ansi -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUNAME="$(UNAME)" $(OPTIMIZE_FLAG) all: dus diff --git a/dus.c b/dus.c index e0b602e..e215207 100644 --- a/dus.c +++ b/dus.c @@ -293,7 +293,7 @@ void print_sorted(struct file_with_size *root, int width, int height) { /**********************************************************************/ void print_help(FILE *out) { fprintf(out, "Usage: dus [OPTION]... [FILE]...\n"); - fprintf(out, "Version %s\n", VERSION_NUMBER); + fprintf(out, "Version %s (%s)\n", VERSION_NUMBER, UNAME); fprintf(out, "List files and directories sorted according to their size or content size. Take the content of the current directory as argument if none is provided.\n"); fprintf(out, "\n"); fprintf(out, " -d ignore files and directories starting with a '.'\n");