[BACK]Return to mkinstalldirs CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

Annotation of src/usr.bin/less/mkinstalldirs, Revision 1.2

1.1       etheisen    1: #!/bin/sh
1.2     ! niklas      2: #      $OpenBSD$
        !             3:
1.1       etheisen    4: # mkinstalldirs --- make directory hierarchy
                      5: # Author: Noah Friedman <friedman@prep.ai.mit.edu>
                      6: # Created: 1993-05-16
                      7: # Last modified: 1994-03-25
                      8: # Public domain
                      9:
                     10: errstatus=0
                     11:
                     12: for file in ${1+"$@"} ; do
                     13:    set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
                     14:    shift
                     15:
                     16:    pathcomp=
                     17:    for d in ${1+"$@"} ; do
                     18:      pathcomp="$pathcomp$d"
                     19:      case "$pathcomp" in
                     20:        -* ) pathcomp=./$pathcomp ;;
                     21:      esac
                     22:
                     23:      if test ! -d "$pathcomp"; then
                     24:         echo "mkdir $pathcomp" 1>&2
                     25:         mkdir "$pathcomp" || errstatus=$?
                     26:      fi
                     27:
                     28:      pathcomp="$pathcomp/"
                     29:    done
                     30: done
                     31:
                     32: exit $errstatus
                     33:
                     34: # mkinstalldirs ends here