-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwritecd
More file actions
executable file
·65 lines (51 loc) · 1.56 KB
/
Copy pathwritecd
File metadata and controls
executable file
·65 lines (51 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/perl
use strict;
use diagnostics;
use warnings;
use Sys::Hostname;
# if the number of args > 0 and isn't then pass them to the command
# else print the idiot message
if (scalar(@ARGV) > 0) {
my $drive;
my $args = join(" ", @ARGV);
# fixup for case's multiple drive layout - use the newer,
# better drive for burns, which is drive "1";
if (hostname() eq "case") {
if ($0 =~ /dvd/) {
$drive = "/dev/dvdrw1";
}
else {
$drive = "/dev/cdrw1";
}
}
elsif (hostname() eq "hiro") {
$drive = "/dev/sr1";
}
else {
die "Unknown host";
}
`wodim -vvv -dao -eject dev=${drive} ${args}`
}
else {
print <<EOF
Usage: writecd [options] track1...trackn
Options:
-dummy do everything with laser turned off
-pad Pad data tracks with 15 zeroed sectors
Pad audio tracks to a multiple of 2352 bytes
-audio Subsequent tracks are CD-DA audio tracks
-data Subsequent tracks are CD-ROM data mode 1 (default)
-useinfo Use *.inf file for CD-TEXT (use with -text)
-text Write CD-TEXT to CD
Note: -dummy will do test writes for any of these
To Create an all data CD from a raw data file
writecd cdimage.raw
To Write an all audio CD w/ properly sized files
writecd -audio track*.cdda.wav
Or the above can be a subdirectory containing those files
For improperly sized files, use the -pad option
To Create a mixed-mode CD (track 1 is data, the rest is audio)
writecd cdimage.raw -audio track*.cdda.wav
EOF
;
}