blob: 0b1c22043bff81959a3ef02d93e86a98940fd8b9 [file] [log] [blame]
--- install-sh 2006-03-25 20:04:46 +0000
+++ install-sh 2007-09-14 10:53:29 +0100
@@ -246,7 +246,10 @@
fi
if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
+ { $doit $mkdircmd "$dst" || lasterr=$?
+ # It's ok for mkdir to fail if the directory already exists.
+ test -d "$dst" || { (exit ${lasterr-1}); exit; }
+ } \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \