view mkinstalldirs @ 49208:5a945cb7d742

(ido-ignore-directories-merge): Doc fix. (ido-max-prompt-width): Renamed from ido-max-prompt-path. (ido-enable-last-directory-history): Doc fix. (ido-work-directory-list-ignore-regexps): Doc fix. (ido-enable-tramp-completion): Doc fix. (ido-record-ftp-work-directories): Doc fix. (ido-merge-ftp-work-directories): Doc fix. (ido-rewrite-file-prompt-functions): Renamed from ido-make-file-prompt-hook. Directory name is now in dynamic variable `dirname' (instead of `path'). (ido-rewrite-file-prompt-rules): Renamed from ido-rewrite-prompt-path-rules. (ido-read-file-name-as-directory-commands): Doc fix. (ido-last-directory-list): Doc fix. (ido-work-directory-list): Doc fix. (ido-work-file-list): Doc fix. (ido-make-prompt): Directory name now in `dirname' var. (ido-edit-input): Doc fix. (ido-complete): Fix error message. (ido-copy-current-word): Doc fix. (ido-find-file): Doc fix.
author Kim F. Storm <storm@cua.dk>
date Mon, 13 Jan 2003 22:56:53 +0000
parents 774df19dd335
children f0eb34e60705 746c40973d25
line wrap: on
line source

#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain

# $Id: mkinstalldirs,v 1.1 2001/02/02 13:04:53 gerd Exp $

errstatus=0

for file
do
   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
   shift

   pathcomp=
   for d
   do
     pathcomp="$pathcomp$d"
     case "$pathcomp" in
       -* ) pathcomp=./$pathcomp ;;
     esac

     if test ! -d "$pathcomp"; then
        echo "mkdir $pathcomp" 1>&2

        (mkdir "$pathcomp" && chmod a+rx "$pathcomp") || lasterr=$?

        if test ! -d "$pathcomp"; then
  	  errstatus=$lasterr
        fi
     fi

     pathcomp="$pathcomp/"
   done
done

exit $errstatus

# mkinstalldirs ends here