mkinstalldirs revision 72445
172445Sassar#! /bin/sh 272445Sassar# mkinstalldirs --- make directory hierarchy 372445Sassar# Author: Noah Friedman <friedman@prep.ai.mit.edu> 472445Sassar# Created: 1993-05-16 572445Sassar# Public domain 672445Sassar 772445Sassar# $Id$ 872445Sassar 972445Sassarerrstatus=0 1072445Sassar 1172445Sassarfor file 1272445Sassardo 1372445Sassar set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 1472445Sassar shift 1572445Sassar 1672445Sassar pathcomp= 1772445Sassar for d 1872445Sassar do 1972445Sassar pathcomp="$pathcomp$d" 2072445Sassar case "$pathcomp" in 2172445Sassar -* ) pathcomp=./$pathcomp ;; 2272445Sassar esac 2372445Sassar 2472445Sassar if test ! -d "$pathcomp"; then 2572445Sassar echo "mkdir $pathcomp" 2672445Sassar 2772445Sassar mkdir "$pathcomp" || lasterr=$? 2872445Sassar 2972445Sassar if test ! -d "$pathcomp"; then 3072445Sassar errstatus=$lasterr 3172445Sassar fi 3272445Sassar fi 3372445Sassar 3472445Sassar pathcomp="$pathcomp/" 3572445Sassar done 3672445Sassardone 3772445Sassar 3872445Sassarexit $errstatus 3972445Sassar 4072445Sassar# mkinstalldirs ends here 41