]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - mkinstalldirs
ncurses 5.6 - patch 20061223
[ncurses.git] / mkinstalldirs
index 91f6d04e17c2b7b003c8e54e4c24646818d81456..ffe7494c4073b0569f91accd851b80b4ad86776d 100755 (executable)
@@ -1,13 +1,15 @@
-#!/bin/sh
+#! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
 # Created: 1993-05-16
 # Last modified: 1994-03-25
 # Public domain
+#
 
 errstatus=0
+umask 022
 
-for file in ${1+"$@"} ; do 
+for file in ${1+"$@"} ; do
    set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
    shift
 
@@ -20,7 +22,11 @@ for file in ${1+"$@"} ; do
 
      if test ! -d "$pathcomp"; then
         echo "mkdir $pathcomp" 1>&2
-        mkdir "$pathcomp" || errstatus=$?
+        case "$pathcomp" in
+          [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]: )
+                ;;               # DOSISH systems
+          * )          mkdir "$pathcomp" || errstatus=$? ;;
+        esac
      fi
 
      pathcomp="$pathcomp/"