Re: [PATCH] Makefile: add and use the ".DELETE_ON_ERROR" flag
Ævar Arnfjörð Bjarmason wrote:
> On Wed, Jun 23 2021, Felipe Contreras wrote:
Show 15 quoted lines
> >> > What about these?
> >> >
> >> > $(REMOTE_CURL_ALIASES):
> >>
> >> Uses a chain of ln/ln -s/cp, would need to add "-f" flags.
> >
> > Why? Isn't "x && a || b || c" the same as "a || b || c" if x is always true?
>
> It does:
>
> rm x &&
> ln y x || ln -s y x || cp y x
>
> If you run that you'll get a hardlink the first time around, but the
> second time around you'll fall back to the "cp" if you remove the "rm".
Right. We'll need to do ln -f, and god knows if that's portable.
--
Felipe Contreras