summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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