view mkinstalldirs @ 58474:142d1806f768

(math-fd-date, math-fd-dt, math-fd-year, math-fd-month) (math-fd-day, math-fd-weekday, math-fd-hour, math-fd-minute) (math-fd-second, math-fd-bc-flag): New variables. (math-format-date, math-format-date-part): Replace variables date, dt, year, month, day, weekday, hour, minute, second and bc-flag by declared variables. (math-pd-str): New variable. (math-parse-date, math-parse-date-word, math-parse-standard-date): Replace variable str by declared variable. (math-daylight-savings-hook, math-tzone-names): Move definitions to earlier in the file. (var-TimeZone): Declare it. (math-exp-str, math-exp-pos): Declare them. (math-sh-year): New variable. (math-setup-add-holidays, math-setup-holidays) (math-setup-year-holiday): Replace variable `year' by declared variable.
author Jay Belanger <jay.p.belanger@gmail.com>
date Wed, 24 Nov 2004 17:59:37 +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