|
|
Burn a CD-R without using a temporary image
And here is the perlocratic response:
#!/usr/bin/perl
if(@ARGV < 1 || @ARGV > 2) {
warn "Usage: burndir directory [cd name]\n";
exit 1;
}
# detect superdrive or cd burner
chomp($drive = `system_profiler SPIDEDataType | grep DVD-RW`);
$burnerType = ((length $drive == 0) ? "IOCompactDiscServices" : "IODVDServices");
# get variables
$dir = shift;
$cdname = shift;
$cdname = $dir unless $cdname;
$cdname =~ s#.*/##;
# burn the sucker
system "mkisofs -V \"${cdname}\" -J -r \"${dir}\" | cdrecord dev=${burnerType} -v -", "\n";
Note, also, that you can get cdrecord using OpenDarwin's "port" command:port install cdrtools Enjoy
Burn a CD-R without using a temporary image
your script doesn't handle the burndir . option correctly (hence why i use File.expand_path)
Burn a CD-R without using a temporary image
Sure seems to take a long time to pull from that System Profile bit. Could you get the necessary info from here...
Burn a CD-R without using a temporary image
i agree that it takes awhile. however it's a small price to pay for burning a cd which usually takes a few minutes. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|