This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] mkinstalldirs: quiet it down


The build system will already echo `.../mkinstalldirs <dir>` for us, so
there's no need to manually echo `mkdir -p <dir>`.  Further, when we do
not return an error due to parallel issues, we shouldn't allow the error
written by mkdir to be shown at all.  So silence that too.

Now a fresh `make -s -j8` is much less noisy when building ports that
are generally warning free.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2012-08-12  Mike Frysinger  <vapier@gentoo.org>

	* scripts/mkinstalldirs: Comment out mkdir echo.  Assign output of
	mkdir to a variable, and echo that when the directory doesn't exist.
---
 scripts/mkinstalldirs |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/mkinstalldirs b/scripts/mkinstalldirs
index f945dbf..1fe9d53 100755
--- a/scripts/mkinstalldirs
+++ b/scripts/mkinstalldirs
@@ -20,12 +20,14 @@ do
      esac
 
      if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
+        #echo "mkdir $pathcomp" 1>&2
 
-        mkdir "$pathcomp" || lasterr=$?
+        # Silence non-fatal errors (e.g. dir already exists).
+        out=$(mkdir "$pathcomp" 2>&1) || lasterr=$?
 
         if test ! -d "$pathcomp"; then
-  	  errstatus=$lasterr
+           echo "$out" 1>&2
+           errstatus=$lasterr
         fi
      fi
 
-- 
1.7.9.7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]