On 07/21/2016 12:15 PM, Bernd Edlinger wrote:
Hi,
> So rather than relying on ln to remove the link, why don't we just
> explicitly remove it with rm -f?
sounds good, I ran into similar issues already.
ln -nfs does not follow the target if it is a symlink
-n, --no-dereference
treat LINK_NAME as a normal file if it is a symbolic
link to a
directory
but I think a simple rm -f will do as well, and avoid potential
interoperability issues.
However wget has a similar issue, if the $MPFR.tar.gz file is already
there, maybe incomplete, the wget chooses a new name, so I'd suggest
to rm -f that file as well, and the whole $MPFR subtree while you are
already there.
Agreed. And naturally the question is do we bother to check the return
code from the rm -f? I think we should and exit with an error if it fails.
jeff