98N/A#! /bin/sh
98N/A# mkinstalldirs --- make directory hierarchy
287N/A# Author: Noah Friedman <friedman@prep.ai.mit.edu>
98N/A# Created: 1993-05-16
98N/A# Public domain
98N/A
98N/A# $Id: mkinstalldirs,v 1.1 2003/06/04 00:25:33 marka Exp $
98N/A
98N/Aerrstatus=0
98N/A
98N/Afor file
98N/Ado
98N/A set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
98N/A shift
98N/A
98N/A pathcomp=
98N/A for d
98N/A do
98N/A pathcomp="$pathcomp$d"
98N/A case "$pathcomp" in
98N/A -* ) pathcomp=./$pathcomp ;;
98N/A esac
98N/A
98N/A if test ! -d "$pathcomp"; then
98N/A echo "mkdir $pathcomp"
98N/A
98N/A mkdir "$pathcomp" || lasterr=$?
98N/A
98N/A if test ! -d "$pathcomp"; then
98N/A errstatus=$lasterr
354N/A fi
98N/A fi
98N/A
98N/A pathcomp="$pathcomp/"
354N/A done
354N/Adone
354N/A
354N/Aexit $errstatus
354N/A
354N/A# mkinstalldirs ends here
354N/A