summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-12-15 15:15:28 +0100
committerErich Eckner <git@eckner.net>2016-12-15 15:15:28 +0100
commit789721946a35e3d2228179ac3585d35fbd5ff8b5 (patch)
tree882b4424dc6a6fcfb31421ab6164ee126b8f93cc
parenta1cd0129c22674b3d12b133210060048d3e21e2f (diff)
downloadburn-audio-cd-789721946a35e3d2228179ac3585d35fbd5ff8b5.tar.xz
only join if necessary
-rwxr-xr-xburn-audio-cd13
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