On Wed, Aug 17, 2016 at 07:34:07PM +0200, Nicolas George wrote:
> Le primidi 1er fructidor, an CCXXIV, Clement Boesch a écrit :
> > maybe these files should be in /tmp
> >
> > i'd also suggest
> >
> > TMPFILES="murge.theirs murge.common murge.ours murge.X"
> > trap 'rm -f -- $TMPFILES' EXIT
> >
> > (stolen from configure)
>
> Temporary files are annoying and tricky (and configure does not clean up
> when it is interrupted).
>
> I suggest to require a more advanced shell (bash or zsh; since this tool is
> meant for developers it is acceptable) and use process substitution:
>
> diff <(grep ...) <(grep ...)
>
> It starts both grep processes just like "grep | diff", but then, instead of
> connecting the other end of the pipe to diff's standard input, it gives it
> the corresponding file name as /dev/fd/42.
>
> If temp files are really necessary because the command does not work with
> pipes, then zsh's process substitution can serve:
>
> diff =(grep ...) =(grep ...)
>
> It does the same as <(grep) but with a temp file instead of a pipe; zsh does
> all the cleanup for us.
>
> Last of all, if temp files are necessary because the output needs to be
> processed several times, zsh's process substitution can still be abused:
>
> function do_the_work {
> grep > $1
> grep > $2
> grep > $3
> diff $1 $2
> diff $2 $3
> }
> do_the_work =(:) =(:) =(:)i didnt realize it first but all these will also break the output currently what you would get is somethig like below note the filenames! IIUC they would be like /dev/fd/42 with these changes making it unreadable ill post a patch fixing the other issues but the tempfiles i wont touch --- murge.ours 2016-08-18 18:37:05.988944547 +0200 +++ murge.theirs 2016-08-18 18:37:05.984944545 +0200 @@ -1,2 +1,2 @@ -#define LIBAVFILTER_VERSION_MINOR 52 +#define LIBAVFILTER_VERSION_MINOR 47 #define LIBAVFILTER_VERSION_MICRO 100 --- murge.common 2016-08-18 18:37:05.988944547 +0200 +++ murge.theirs 2016-08-18 18:37:05.984944545 +0200 @@ -1,2 +1,2 @@ -#define LIBAVFILTER_VERSION_MINOR 46 -#define LIBAVFILTER_VERSION_MICRO 102 +#define LIBAVFILTER_VERSION_MINOR 47 +#define LIBAVFILTER_VERSION_MICRO 100 --- murge.common 2016-08-18 18:37:05.988944547 +0200 +++ murge.ours 2016-08-18 18:37:05.988944547 +0200 @@ -1,2 +1,2 @@ -#define LIBAVFILTER_VERSION_MINOR 46 -#define LIBAVFILTER_VERSION_MICRO 102 +#define LIBAVFILTER_VERSION_MINOR 52 +#define LIBAVFILTER_VERSION_MICRO 100 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
