]> diplodocus.org Git - flac-archive/blobdiff - fa-rip
Here's a simple hack to split single cue-containing flac files into
[flac-archive] / fa-rip
diff --git a/fa-rip b/fa-rip
index 20f4190ea5b4173a5a5da3626af8e89f0351b4a2..22140a54a4991601bddcc2be661d242e3d429e32 100755 (executable)
--- a/fa-rip
+++ b/fa-rip
@@ -164,12 +164,16 @@ sub rip {
     my $device = shift;
     my $trackcount = shift;
     my $single_file = shift;
+    my @output;
 
     $device ||= '/dev/cdrom';
+    if ($single_file) {
+        @output = ("1-$trackcount", 'wav');
+    } else {
+        @output = ('-B');
+    }
 
-    exec('cdparanoia', '-d', $device,
-         (($single_file and ("1-$trackcount", 'wav')) or ('-B')));
-    # exec prints its own error message so just
+    exec('cdparanoia', '-d', $device, @output);
     die;
 }