diff options
author | Erich Eckner <git@eckner.net> | 2016-12-15 15:15:28 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-12-15 15:15:28 +0100 |
commit | 789721946a35e3d2228179ac3585d35fbd5ff8b5 (patch) | |
tree | 882b4424dc6a6fcfb31421ab6164ee126b8f93cc | |
parent | a1cd0129c22674b3d12b133210060048d3e21e2f (diff) | |
download | burn-audio-cd-789721946a35e3d2228179ac3585d35fbd5ff8b5.tar.xz |
only join if necessary
-rwxr-xr-x | burn-audio-cd | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/burn-audio-cd b/burn-audio-cd index 45659c5..d5915e4 100755 --- a/burn-audio-cd +++ b/burn-audio-cd @@ -1,7 +1,16 @@ #!/bin/bash -shncue "$@" > cd.cue -shnjoin "$@" +if [ ! -r cd.cue ] \ + || [ ! -r joined.wav ] \ + || [ "$(ls -1t cd.cue joined.wav "$@" \ + | head -n2 \ + | sort \ + | tr '\n' ' ')" \ + != "cd.cue joined.wav " ] +then + shncue "$@" > cd.cue + shnjoin "$@" +fi su -c ' /etc/rc.d/boinc stop |