]> diplodocus.org Git - flac-archive/commitdiff
Untested: make multi-file the default with a single-file option.
authorepg <>
Fri, 14 Apr 2006 16:20:36 +0000 (16:20 +0000)
committerepg <>
Fri, 14 Apr 2006 16:20:36 +0000 (16:20 +0000)
fa-rip

diff --git a/fa-rip b/fa-rip
index b7a4fc0dab568679b17d5a7888606ac63992734d..20f4190ea5b4173a5a5da3626af8e89f0351b4a2 100755 (executable)
--- a/fa-rip
+++ b/fa-rip
@@ -163,10 +163,12 @@ sub tags {
 sub rip {
     my $device = shift;
     my $trackcount = shift;
+    my $single_file = shift;
 
     $device ||= '/dev/cdrom';
 
-    exec('cdparanoia', '-Bd', $device);
+    exec('cdparanoia', '-d', $device,
+         (($single_file and ("1-$trackcount", 'wav')) or ('-B')));
     # exec prints its own error message so just
     die;
 }
@@ -185,6 +187,7 @@ sub make_post_processor {
 MAIN: {
     my $no_mb;
     my $post_processor;
+    my $single_file;
     my $trackcount = 99;
     my $help;
     my $tempdir;
@@ -193,6 +196,7 @@ MAIN: {
                'device|d=s' => \$CDDEV,
                'no-musicbrainz|m' => \$no_mb,
                'post-processor|p=s', \$post_processor,
+               'single-file|s' => \$single_file,
                'tracks|t=i' => \$trackcount,
                'help|h|?' => \$help,
               ) or pod2usage();
@@ -205,7 +209,7 @@ MAIN: {
     make_post_processor($post_processor);
     $trackcount = mkcue($CDDEV, $trackcount);
     tags($CDDEV, $trackcount, $no_mb);
-    rip($CDDEV, $trackcount);
+    rip($CDDEV, $trackcount, $single_file);
 }
 
 \f