From a5617fc545d6a8ea55a2257e193a14803414fdb1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 1 Oct 2001 06:34:38 +0000 Subject: [PATCH] Don't invoke mkdir if the directories all already exist. This saves unnecessary output of "mkdir -p -- FOO" when FOO already exists. --- lib/mkinstalldirs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/mkinstalldirs b/lib/mkinstalldirs index c510e22e..f9c37afd 100755 --- a/lib/mkinstalldirs +++ b/lib/mkinstalldirs @@ -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 -- 2.43.5