From 974854f21a1787a62b4cf8d7716c65f3712819df Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 9 Apr 2020 20:12:22 +0000 Subject: splitfx: support --err-suffix option Write the contents of "stderr". This is useful for capturing the per-track output of the sox(1) "stats" effect when combined with parallel "--jobs". --- lib/dtas/splitfx.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/dtas/splitfx.rb b/lib/dtas/splitfx.rb index 384df0f..58c8ff4 100644 --- a/lib/dtas/splitfx.rb +++ b/lib/dtas/splitfx.rb @@ -250,7 +250,10 @@ class DTAS::SplitFX # :nodoc: command = 'true' if opts[:dryrun] # still gotta fork # pgroup: false so Ctrl-C on command-line will immediately stop everything - [ dtas_spawn(env, command, pgroup: false), comments ] + o = { pgroup: false } + e = opts[:err_suffix] and + o[:err] = [ "#{env['OUTDIR']}#{env['TRACKNUMBER']}#{e}", 'a' ] + [ dtas_spawn(env, command, o), comments ] end def load_tracks!(hash) -- cgit v1.2.3-24-ge0c7