view doc/lispintro/mkinstalldirs @ 86466:7777ff0392d6

(calc-refresh-evaltos, calc-execute-kbd-macro) (math-is-true, calc-explain-why, calc-alg-edit) (math-composite-inequalities, math-flatten-lands) (math-multi-subst, calcFunc-vmatches, math-simplify) (math-known-matrixp, math-parse-fortran-subscr, math-to-radians-2) (math-read-string, math-read-brackets, math-read-angle-brackets): Declare as functions.
author Jay Belanger <jay.p.belanger@gmail.com>
date Tue, 27 Nov 2007 04:00:56 +0000
parents 88851c2eef53
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" || lasterr=$?

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

     pathcomp="$pathcomp/"
   done
done

exit $errstatus

# mkinstalldirs ends here