Blame mkinstalldirs

Packit 5ce601
#! /bin/sh
Packit 5ce601
# mkinstalldirs --- make directory hierarchy
Packit 5ce601
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
Packit 5ce601
# Created: 1993-05-16
Packit 5ce601
# Public domain
Packit 5ce601
Packit 5ce601
errstatus=0
Packit 5ce601
Packit 5ce601
for file
Packit 5ce601
do
Packit 5ce601
   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
Packit 5ce601
   shift
Packit 5ce601
Packit 5ce601
   pathcomp=
Packit 5ce601
   for d
Packit 5ce601
   do
Packit 5ce601
     pathcomp="$pathcomp$d"
Packit 5ce601
     case "$pathcomp" in
Packit 5ce601
       -* ) pathcomp=./$pathcomp ;;
Packit 5ce601
     esac
Packit 5ce601
Packit 5ce601
     if test ! -d "$pathcomp"; then
Packit 5ce601
        echo "mkdir $pathcomp" 1>&2
Packit 5ce601
Packit 5ce601
        mkdir "$pathcomp" || lasterr=$?
Packit 5ce601
Packit 5ce601
        if test ! -d "$pathcomp"; then
Packit 5ce601
  	  errstatus=$lasterr
Packit 5ce601
        fi
Packit 5ce601
     fi
Packit 5ce601
Packit 5ce601
     pathcomp="$pathcomp/"
Packit 5ce601
   done
Packit 5ce601
done
Packit 5ce601
Packit 5ce601
exit $errstatus
Packit 5ce601
Packit 5ce601
# mkinstalldirs ends here