mkinstalldirs revision 922e6a3c2ac4ef900dd9dc99f0cc137f18372583
409N/A#! /bin/sh
19N/A# mkinstalldirs --- make directory hierarchy
19N/A# Author: Noah Friedman <friedman@prep.ai.mit.edu>
19N/A# Created: 1993-05-16
19N/A# Public domain
19N/A
19N/A# $Id: mkinstalldirs,v 1.1 2000/09/20 19:05:51 gson Exp $
19N/A
19N/Aerrstatus=0
19N/A
19N/Afor file
19N/Ado
19N/A set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
19N/A shift
19N/A
19N/A pathcomp=
19N/A for d
19N/A do
19N/A pathcomp="$pathcomp$d"
19N/A case "$pathcomp" in
19N/A -* ) pathcomp=./$pathcomp ;;
19N/A esac
221N/A
19N/A if test ! -d "$pathcomp"; then
19N/A echo "mkdir $pathcomp" 1>&2
144N/A
161N/A mkdir "$pathcomp" || lasterr=$?
26N/A
388N/A if test ! -d "$pathcomp"; then
45N/A errstatus=$lasterr
201N/A fi
307N/A fi
251N/A
462N/A pathcomp="$pathcomp/"
307N/A done
461N/Adone
384N/A
384N/Aexit $errstatus
384N/A
104N/A# mkinstalldirs ends here
34N/A