You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/eclass/ELT-patches/install-sh/1.5

15 lines
468 B

--- install-sh 2007-07-04 14:36:49 +0100
+++ install-sh 2007-09-14 11:00:41 +0100
@@ -192,7 +192,10 @@
if [ x"$dir_arg" != x ]
then
- $doit $instcmd $dst &&
+ { $doit $instcmd "$dst" || lasterr=$?
+ # It's ok for mkdir to fail if the directory already exists.
+ test -d "$dst" || { (exit ${lasterr-1}); exit; }
+ } &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&