view mkinstalldirs @ 82970:5ef78f4dd84f

[ Merge from Emacs trunk: ] 2004-08-30 Juanma Barranquero <lektu@terra.es> * ietf-drums.el (ietf-drums-remove-whitespace): Fix character constant. [Emacs/trunk 2003-02-18] 2004-08-30 Andreas Schwab <schwab@suse.de> * nnlistserv.el (nnlistserv-kk-wash-article): Fix paren nesting. * gnus-score.el (gnus-summary-increase-score): Fix format string. [Emacs/trunk 2004-02-08] 2004-08-30 Stefan Monnier <monnier@iro.umontreal.ca> * nnimap.el (nnimap-demule): Avoid string-as-multibyte. [Emacs/trunk 2004-05-06] 2004-08-30 Kim F. Storm <storm@cua.dk> * nntp.el (nntp-authinfo-file): Add :group 'nntp. * nnimap.el (nnimap-authinfo-file, nnimap-prune-cache): Add :group 'nnimap. [Emacs/trunk 2004-06-29]
author Reiner Steib <Reiner.Steib@gmx.de>
date Mon, 30 Aug 2004 18:18:31 +0000
parents 746c40973d25
children 730155197b96 eb7e8d483840
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

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