summaryrefslogtreecommitdiff
path: root/config/install-sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/install-sh')
-rwxr-xr-xconfig/install-sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/install-sh b/config/install-sh
index 8042a49ba..77bc38144 100755
--- a/config/install-sh
+++ b/config/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