mkinstalldirs revision 303975
1193323Sed#! /bin/sh 2193323Sed# mkinstalldirs --- make directory hierarchy 3193323Sed# Author: Noah Friedman <friedman@prep.ai.mit.edu> 4193323Sed# Created: 1993-05-16 5193323Sed# Public domain 6193323Sed 7193323Sed# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ 8193323Sed 9193323Sederrstatus=0 10193323Sed 11193323Sedfor file 12193323Seddo 13193323Sed set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14193323Sed shift 15193323Sed 16193323Sed pathcomp= 17193323Sed for d 18193323Sed do 19193323Sed pathcomp="$pathcomp$d" 20193323Sed case "$pathcomp" in 21193323Sed -* ) pathcomp=./$pathcomp ;; 22193323Sed esac 23193323Sed 24193323Sed if test ! -d "$pathcomp"; then 25193323Sed echo "mkdir $pathcomp" 26193323Sed 27193323Sed mkdir "$pathcomp" || lasterr=$? 28193323Sed 29193323Sed if test ! -d "$pathcomp"; then 30193323Sed errstatus=$lasterr 31193323Sed fi 32193323Sed fi 33193323Sed 34193323Sed pathcomp="$pathcomp/" 35193323Sed done 36193323Seddone 37193323Sed 38193323Sedexit $errstatus 39193323Sed 40193323Sed# mkinstalldirs ends here 41193323Sed