,
Ralf
move-if-change: cope with concurrent mv of identical file.
* build-aux/move-if-change (CMPPROG): Accept environment
variable as an override for `cmp'.
(usage): Document CMPPROG.
Adjust comparison to drop stdout. Cope with failure of mv if
the target file ex
amp; $cmpprog -- "$1" "$2" >/dev/null; then
> >rm -f -- "$1"
> > else
> > - mv -f -- "$1" "$2"
> > + if mv -f -- "$1" "$2"; then :; else
> > +# Ignore failure due to a concurrent move-if-change.
f -- "$1" "$2"
> + if mv -f -- "$1" "$2"; then :; else
> +# Ignore failure due to a concurrent move-if-change.
> +$cmpprog "$1" "$2" >/dev/null 2>&1 && rm -f -- "$1"
The two cmpprog invocati
cy going from 'cmp -s' to cmp is not a problem.
Or is all of this totally overkill here?
Thanks,
Ralf
move-if-change: cope with concurrent mv of identical file.
* build-aux/move-if-change (CMPPROG): Accept environment
variable as an override for `cmp'.
(usage):
Eric Blake <[EMAIL PROTECTED]> writes:
> But I've checked this in anyways:
> http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commit;h=da27171
I suspect that nobody needs it nowadays; in that case it might be
better to omit it from gnulib, as it might confuse people into
thinking that it's useful.
Karl Berry freefriends.org> writes:
>
> Does anyone know where a canonical copy of move-if-change is stored?
>
> There never was a canonical location afaik.
>
> So I too think the Autoconf version is the best place to start, and you
> should just put it in gnuli
Does anyone know where a canonical copy of move-if-change is stored?
There never was a canonical location afaik.
So I too think the Autoconf version is the best place to start, and you
should just put it in gnulib now, if/since you need it.
The gcc/emacs/etc. versions are unlikely to be
Eric Blake <[EMAIL PROTECTED]> writes:
> Does anyone know where a canonical copy of move-if-change is stored?
It used to be in Autoconf, but got removed between 2.60 and 2.61; see
<http://lists.gnu.org/archive/html/autoconf-patches/2006-08/msg00040.html>.
If you really nee
Eric Blake <[EMAIL PROTECTED]> wrote:
> ...and we should make gnulib
> become the canonical home of a proper implementation? I would like to add it
> into gnulib/build-aux, so that projects can easily grab the latest version of
> it from gnulib.
That sounds like the way to go.
Does anyone know where a canonical copy of move-if-change is stored? Or maybe
no existing version is good enough for GNU standards, and we should make gnulib
become the canonical home of a proper implementation? I would like to add it
into gnulib/build-aux, so that projects can easily grab
10 matches
Mail list logo