summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/mkinstalldirs
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-08-10 09:43:22 +0000
committerpeter <peter@FreeBSD.org>2001-08-10 09:43:22 +0000
commita037ef8f32200b26968e77344bcfb963251fa8b9 (patch)
tree2b4dc24b830b514680009ead3884ecb1c40974c7 /contrib/cvs/mkinstalldirs
parent590c411955d6975551ffeaf41d7faf4b26f836d1 (diff)
downloadFreeBSD-src-a037ef8f32200b26968e77344bcfb963251fa8b9.zip
FreeBSD-src-a037ef8f32200b26968e77344bcfb963251fa8b9.tar.gz
Import cvs-1.11.1p1 onto vendor branch
Diffstat (limited to 'contrib/cvs/mkinstalldirs')
-rwxr-xr-xcontrib/cvs/mkinstalldirs21
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/"
OpenPOWER on IntegriCloud