From cc0d2177860c23b29f42640eb36db8c5ac0d63a5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 28 Sep 2003 12:36:51 +0000 Subject: . --- config/mkinstalldirs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/mkinstalldirs b/config/mkinstalldirs index 8065dadd9..a55cff670 100644 --- a/config/mkinstalldirs +++ b/config/mkinstalldirs @@ -4,7 +4,7 @@ # Created: 1993-05-16 # Public domain. -scriptversion=2003-06-14.23 +scriptversion=2003-09-26.19 errstatus=0 dirmode="" @@ -65,12 +65,25 @@ case $dirmode in if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./-- && rmdir ./-- fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./-- "./$dirmode"; + do + test -d $d && rmdir $d + done fi ;; esac -- cgit v1.2.3-70-g09d2