160786Sps#!/bin/sh
260786Sps# mkinstalldirs --- make directory hierarchy
360786Sps# Author: Noah Friedman <friedman@prep.ai.mit.edu>
460786Sps# Created: 1993-05-16
560786Sps# Last modified: 1994-03-25
660786Sps# Public domain
760786Sps
860786Spserrstatus=0
960786Sps
1060786Spsfor file in ${1+"$@"} ; do 
1160786Sps   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
1260786Sps   shift
1360786Sps
1460786Sps   pathcomp=
1560786Sps   for d in ${1+"$@"} ; do
1660786Sps     pathcomp="$pathcomp$d"
1760786Sps     case "$pathcomp" in
1860786Sps       -* ) pathcomp=./$pathcomp ;;
1960786Sps     esac
2060786Sps
2160786Sps     if test ! -d "$pathcomp"; then
2260786Sps        echo "mkdir $pathcomp" 1>&2
2360786Sps        mkdir "$pathcomp" || errstatus=$?
2460786Sps     fi
2560786Sps
2660786Sps     pathcomp="$pathcomp/"
2760786Sps   done
2860786Spsdone
2960786Sps
3060786Spsexit $errstatus
3160786Sps
3260786Sps# mkinstalldirs ends here
33