mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-22 13:50:47 +00:00
Test if mkdir accepts -p
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@7207 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e3ad9b6c2d
commit
dd06729fd3
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Aug 16 18:24:13 2000 Adam Fedor <fedor@ultra.doc.com>
|
||||
|
||||
* mkinstalldirs: Test if mkdir accepts -p arg.
|
||||
|
||||
2000-08-06 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Version 0.6.6 released.
|
||||
|
|
|
@ -8,6 +8,14 @@ defaultIFS='
|
|||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
errstatus=0
|
||||
# Test mkdir -p
|
||||
mkdir -p .test-mkdir || errstatus=$?
|
||||
rmdir .test-mkdir
|
||||
if test $errstatus = 0; then
|
||||
MKDIR="mkdir -p"
|
||||
else
|
||||
MKDIR="mkdir"
|
||||
fi
|
||||
|
||||
for file in ${1+"$@"} ; do
|
||||
oIFS="${IFS}"
|
||||
|
@ -22,8 +30,8 @@ for file in ${1+"$@"} ; do
|
|||
pathcomp="${pathcomp}${d}"
|
||||
|
||||
if test ! -d "${pathcomp}"; then
|
||||
echo "mkdir -p $pathcomp" 1>&2
|
||||
mkdir -p "${pathcomp}" || errstatus=$?
|
||||
echo "$MKDIR $pathcomp" 1>&2
|
||||
$MKDIR "${pathcomp}" || errstatus=$?
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
|
|
Loading…
Reference in a new issue