From: Todd C. Miller Date: Fri, 23 Jul 2010 15:22:44 +0000 (-0400) Subject: "mv -f" on HP-UX doesn't unlink the destination first so add X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49d82a04e739e2a7310952d8e00fec9cba82c56f;p=sudo "mv -f" on HP-UX doesn't unlink the destination first so add an explicit rm before moving the temporary into place. --- diff --git a/install-sh b/install-sh index c8d2b7023..7a207e2d5 100755 --- a/install-sh +++ b/install-sh @@ -209,8 +209,10 @@ if [ X"$1" != X"$2" ] ; then fi ## Copy source to the right dir, then move to right spot. ## Done in two parts so we can hope for atomicity. + ## We need to rm DEST due to bugs in "mv -f" on some systems. ${RM} -f "${TEMP}" || exit 1 ${CP} "$1" "${TEMP}" || exit 1 + ${RM} -f "${DEST}" || exit 1 ${MV} -f "${TEMP}" "${DEST}" || exit 1 fi fi