diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2004-02-15 21:14:23 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2004-02-15 21:14:23 +0000 |
commit | 943f2fbfc1ff1be0d3aa7b59ff3054937c474403 (patch) | |
tree | f7538350c6f73a87631a0c176967299084d27f69 /lib/install-sh | |
parent | 58393a7d84f33b7f23a0cfea8550c47a6601b77f (diff) | |
download | automake-943f2fbfc1ff1be0d3aa7b59ff3054937c474403.tar.gz |
* m4/mkdirp.m4: Use `mkdir -p' only with GNU mkdir, because
Solaris 8's mkdir is not thread-safe.
* lib/mkinstalldirs: Likewise.
* lib/install-sh: Abort when mkdir fails to create a directory.
Report from Nathanael Nerode.
Diffstat (limited to 'lib/install-sh')
-rwxr-xr-x | lib/install-sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/install-sh b/lib/install-sh index 8042a49ba..77bc38144 100755 --- a/lib/install-sh +++ b/lib/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2004-01-13.14 +scriptversion=2004-02-15.20 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -228,7 +228,13 @@ do while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift - test -d "$pathcomp" || $mkdirprog "$pathcomp" + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" || lasterr=$? + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } + fi pathcomp=$pathcomp/ done fi |