From: Felipe Contreras Date: Thu, 01 Jul 2021 03:19:07 GMT Subject: Re: [PATCH] Makefile: add and use the ".DELETE_ON_ERROR" flag Message-ID: <60dd342b92b8b_174a22083a@natae.notmuch> In-Reply-To: <8735t1gk0d.fsf@evledraar.gmail.com> Ævar Arnfjörð Bjarmason wrote: > On Wed, Jun 23 2021, Felipe Contreras wrote: > >> > 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