diff options
author | germeier <germeier> | 2003-04-18 14:14:01 +0000 |
---|---|---|
committer | germeier <germeier> | 2003-04-18 14:14:01 +0000 |
commit | d4629ff70f8a45fb71877fb1ac9f4180f1367960 (patch) | |
tree | 03e392acf1b3e3d065bf1128094a0ed32db21d59 /mplib/mkinstalldirs | |
parent | 477d356ffb4f510fb91e9ee1656bf63906d79830 (diff) | |
download | mpiosh-d4629ff70f8a45fb71877fb1ac9f4180f1367960.tar.gz mpiosh-d4629ff70f8a45fb71877fb1ac9f4180f1367960.tar.bz2 mpiosh-d4629ff70f8a45fb71877fb1ac9f4180f1367960.zip |
initial import of mplib 1.0.1
Diffstat (limited to 'mplib/mkinstalldirs')
-rwxr-xr-x | mplib/mkinstalldirs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mplib/mkinstalldirs b/mplib/mkinstalldirs new file mode 100755 index 0000000..7aebfdd --- /dev/null +++ b/mplib/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 2003/04/18 14:14:01 germeier Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here |