2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00
xcat-core/xCAT-client/bin/copycds-cdrom
2016-07-21 13:27:40 -04:00

29 lines
507 B
Perl
Executable File

#!/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 :