summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-09-28 12:36:51 +0000
committerJim Meyering <jim@meyering.net>2003-09-28 12:36:51 +0000
commitcc0d2177860c23b29f42640eb36db8c5ac0d63a5 (patch)
treeb69445d44a457732fb79558c5854d166b553c024
parentb127b8e824c4d9e2f7789a9d58ec97c33f9b98ac (diff)
downloadcoreutils-cc0d2177860c23b29f42640eb36db8c5ac0d63a5.tar.xz
.
-rw-r--r--config/mkinstalldirs15
1 files changed, 14 insertions, 1 deletions
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