head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	96.11.19.07.38.58;	author tromey;	state Exp;
branches;
next	1.1;

1.1
date	95.12.18.02.45.27;	author tromey;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Various bug fixes
@
text
@#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@@prep.ai.mit.edu>
# Created: 1993-05-16
# Last modified: 1995-03-05
# Public domain

errstatus=0

for file in ${1+"$@@"} ; do
   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
   shift

   pathcomp=
   for d in ${1+"$@@"} ; do
     pathcomp="$pathcomp$d"
     case "$pathcomp" in
       -* ) pathcomp=./$pathcomp ;;
     esac

     if test ! -d "$pathcomp"; then
        echo "mkdir $pathcomp" 1>&2
        mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
     fi

     if test ! -d "$pathcomp"; then
	errstatus=$lasterr
     fi

     pathcomp="$pathcomp/"
   done
done

exit $errstatus
@


1.1
log
@Put into cvs
@
text
@d5 1
d10 1
a10 2
for file
do
d23 5
a27 1
        mkdir "$pathcomp" || errstatus=$?
a34 2

# mkinstalldirs ends here
@
