view lispintro/mkinstalldirs @ 74011:cce8c092567f

(allout-doublecheck-at-and-shallower): Clarify docstring. (allout-inhibit-aberrance-doublecheck): Rename from allout-during-yank-processing. All callers changed. (allout-ascend): Provide for unusual case where some topic after the first in file is at lower depth than the first. (allout-shift-in): Ensure the offspring of the new containing topic are exposed. (allout-encrypt-string): Preserve the coding-system of the text, according to that of the containing buffer. (allout-toggle-subtree-encryption): When the text being encrypted requires a different coding system, offer to preserve the coding system using a file local var.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 15 Nov 2006 16:34:20 +0000
parents 746c40973d25
children 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" || lasterr=$?

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

     pathcomp="$pathcomp/"
   done
done

exit $errstatus

# mkinstalldirs ends here