2008-06-03 15:49:45 +00:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
my $go=1;
|
|
|
|
|
2008-06-03 17:34:57 +00:00
|
|
|
my $file;
|
|
|
|
my $opts = "";
|
|
|
|
|
|
|
|
$file = pop @ARGV;
|
|
|
|
if (!$file) {
|
|
|
|
print "No device given, assuming /dev/cdrom.\n";
|
|
|
|
$file = "/dev/cdrom";
|
|
|
|
}
|
2008-06-03 15:49:45 +00:00
|
|
|
|
2008-06-03 17:34:57 +00:00
|
|
|
while ($go) {
|
2008-06-03 15:49:45 +00:00
|
|
|
$go = 0;
|
2008-06-03 17:34:57 +00:00
|
|
|
#print "copycds $opts $file";
|
|
|
|
system("copycds $opts $file");
|
2008-06-03 15:49:45 +00:00
|
|
|
print "Would you like to copy another CD (y/N)? ";
|
2008-06-03 17:34:57 +00:00
|
|
|
if (<STDIN> =~ /^y/i) {
|
2008-06-03 15:49:45 +00:00
|
|
|
$go = 1;
|
|
|
|
system("eject");
|
|
|
|
print "Replace the CD and press enter.";
|
|
|
|
<STDIN>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# vim: set ts=2 sts=2 sw=2 et ai :
|