view mkinstalldirs @ 53992:c5c237251824

(rx-check, rx-check-any, rx-check-not) (rx-repeat, rx-check-backref, rx-syntax, rx-to-string): Use lower-case "rx" in all error message. (rx-or): Put group around result. (rx-constituents): Add backref. (rx-syntax): Add string-delimiter, comment-delimiter. (rx-categories): Add combining-diacritic. (rx-check-not, rx-greedy, rx): Doc fix. (rx-backref, rx-check-backref): New.
author Eli Zaretskii <eliz@is.elta.co.il>
date Mon, 16 Feb 2004 16:50:18 +0000
parents 774df19dd335
children f0eb34e60705 746c40973d25
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

# $Id: mkinstalldirs,v 1.1 2001/02/02 13:04:53 gerd Exp $

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