view mkinstalldirs @ 83269:48ba3f89c89f

Merged from miles@gnu.org--gnu-2005 (patch 37-38, 162-182) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-162 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-163 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-164 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-165 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-166 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-167 Tweak obsolete function/variable warning message * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-168 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-169 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-170 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-171 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-172 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-173 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-174 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-175 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-176 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-177 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-178 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-179 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-180 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-181 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-182 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-37 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-38 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-309
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 16 Mar 2005 16:06:15 +0000
parents eb7e8d483840
children
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