xcat-core/xCAT-client/bin/copycds-cdrom

28 lines
473 B
Plaintext
Raw Normal View History

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