diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 1999-06-29 18:51:03 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 1999-06-29 18:51:03 +0000 |
commit | d1a62ab68ff3bdca32bc5fe2f1a48b50845d018d (patch) | |
tree | 5f6a555480187e20bfe2e58cb32d6170de33740a /mkinstalldirs | |
parent | 72bbecd67e666ff822b449e4657ab695b6149024 (diff) | |
download | ATCD-d1a62ab68ff3bdca32bc5fe2f1a48b50845d018d.tar.gz |
Oops. Accidentally committed a symbolic link to this file.
Diffstat (limited to 'mkinstalldirs')
-rwxr-xr-x | mkinstalldirs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mkinstalldirs b/mkinstalldirs index e69de29bb2d..6b3b5fc5d4d 100755 --- a/mkinstalldirs +++ b/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$ + +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 |