]> sourceware.org Git - automake.git/commitdiff
Don't invoke mkdir if the directories all already exist.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 1 Oct 2001 06:34:38 +0000 (06:34 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 1 Oct 2001 06:34:38 +0000 (06:34 +0000)
This saves unnecessary output of "mkdir -p -- FOO" when
FOO already exists.

lib/mkinstalldirs

index c510e22ea833b8be2d6aefea2fc28269136d739d..f9c37afd1b84e729f40b280cd4f56da5a9af6596 100755 (executable)
@@ -28,6 +28,15 @@ while test $# -gt 0 ; do
    esac
 done
 
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
 case $# in
 0) exit 0 ;;
 esac
This page took 0.030674 seconds and 5 git commands to generate.