diff options
author | peter <peter@FreeBSD.org> | 2001-08-10 09:43:22 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-08-10 09:43:22 +0000 |
commit | a037ef8f32200b26968e77344bcfb963251fa8b9 (patch) | |
tree | 2b4dc24b830b514680009ead3884ecb1c40974c7 /contrib/cvs/mkinstalldirs | |
parent | 590c411955d6975551ffeaf41d7faf4b26f836d1 (diff) | |
download | FreeBSD-src-a037ef8f32200b26968e77344bcfb963251fa8b9.zip FreeBSD-src-a037ef8f32200b26968e77344bcfb963251fa8b9.tar.gz |
Import cvs-1.11.1p1 onto vendor branch
Diffstat (limited to 'contrib/cvs/mkinstalldirs')
-rwxr-xr-x | contrib/cvs/mkinstalldirs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/contrib/cvs/mkinstalldirs b/contrib/cvs/mkinstalldirs index 9259785..1e240e3 100755 --- a/contrib/cvs/mkinstalldirs +++ b/contrib/cvs/mkinstalldirs @@ -1,27 +1,34 @@ -#!/bin/sh +#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 -# Last modified: 1994-03-25 # Public domain -# + +# $Id: mkinstalldirs,v 1.4 2001/04/12 13:02:39 dprice Exp $ errstatus=0 -for file in ${1+"$@"} ; do +for file +do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= - for d in ${1+"$@"} ; do + for d + do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - mkdir "$pathcomp" || errstatus=$? + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi fi pathcomp="$pathcomp/" |