mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Do not test for 'mkdir -p' ... mkdir -p was supposed to prevent race conditions,
but the test for mkdir -p was itself a generator of major race conditions (and wrote on the filesystem etc) - also don't echo what we do git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@14649 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ddf19f3ffa
commit
0584256a67
1 changed files with 4 additions and 13 deletions
|
@ -11,22 +11,13 @@ else
|
|||
CHOWN_TO=""
|
||||
fi
|
||||
|
||||
MKDIR="mkdir"
|
||||
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
errstatus=0
|
||||
# Test mkdir -p
|
||||
mkdir -p .test-mkdir || errstatus=$?
|
||||
rmdir .test-mkdir
|
||||
if test $errstatus != 0 -o -d "-p"; then
|
||||
if test -d "-p"; then
|
||||
rmdir -p
|
||||
fi
|
||||
MKDIR="mkdir"
|
||||
else
|
||||
MKDIR="mkdir -p"
|
||||
fi
|
||||
|
||||
for file in ${1+"$@"} ; do
|
||||
oIFS="${IFS}"
|
||||
|
@ -41,9 +32,9 @@ for file in ${1+"$@"} ; do
|
|||
pathcomp="${pathcomp}${d}"
|
||||
|
||||
if test ! -d "${pathcomp}"; then
|
||||
echo "$MKDIR $pathcomp" 1>&2
|
||||
#echo "$MKDIR $pathcomp" 1>&2
|
||||
if test ! -z "${CHOWN_TO}"; then
|
||||
echo "chown $CHOWN_TO $pathcomp" 1>&2
|
||||
#echo "chown $CHOWN_TO $pathcomp" 1>&2
|
||||
($MKDIR "${pathcomp}" && chown $CHOWN_TO "${pathcomp}") || errstatus=$?
|
||||
else
|
||||
$MKDIR "${pathcomp}" || errstatus=$?
|
||||
|
|
Loading…
Reference in a new issue