-
Notifications
You must be signed in to change notification settings - Fork 2
/
rsrce.1
208 lines (169 loc) · 4.11 KB
/
rsrce.1
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
.TH RSRCE "1" "2004-03-26" "Debian Project" "Debian GNU/Linux"
.SH NAME
rsrce \- editor for raw MacOS resource forks
.SH SYNOPSIS
.B rsrce
.RB [ \-e ]
.RB [ "\-f \fIscript" ]
.RB [ "\-o \fIoutput\-file" ]
.RI [ input\-file ]
.SH DESCRIPTION
Rsrce is a command driven Macintosh
resource fork editor for Unix-like
operating systems.
It works with raw resource forks
stored in Unix files,
such as the .rsrc files produced by the
.B macutil
package.
Rsrce doesn't allow you to edit the
resource data directly.
It only knows to import/export them
from/to files, performing conversion for
the few resource types it knows.
.SH OPTIONS
.TP
.B \-e
When this option is given, the failure of an editor command will cause rsrce to
quit immediately with a non-zero exit status. This is similar to the
.BR \-e " option to " /bin/sh .
.TP
.BI "\-f " script
Instructs
.B rsrce
to read its commands from the given
.IR script ,
instead of using the standard input.
.TP
.BI "\-o " output\-file
Specifies a default output file for the
.BR write command.
Useful when calling
.B rsrce
scripts which save their changes with a
.B write
command without a filename.
.PP
If an
.I input\-file
is specified,
it is loaded before rsrce starts reading commands,
and is used as the default output
file if the
.B \-o
option has not been given.
.SH USAGE
Rsrce reads commands from the standard input.
Unquoted whitespace is ignored,
except for the purpose of separating arguments.
Empty lines are ignored, and a
.B #
at a position where an argument would have started
indicates a comment which extends to the end of the line.
Text within single quotes is used as-is.
An unquoted backslash can be used
the way it works in C strings,
or to force literal interpretation
of the following character.
Resources are referred to by specifing
their type and id, separated by a colon.
I mean, something like "STR#:128".
If the given type has less than 4 letters,
spaces are added to complete it.
The following commands are available:
.TP
.BR "read " [\fIfile\fR]
read the resources from
.I file
.TP
.BR "write " [\fIfile\fR]
write the resources to
.I file
.TP
.BI "create " resource
create a new, empty resource with the given type and id
.TP
.BI "delete " resource
remove the specified
.I resource
.TP
.BI "rename " resource " " new-name
change the name associated with
.IR resource " to " new-name
.TP
.BI "chattr " resource " " attr-spec
change the attributes of
.I resource
according to
.I attr-spec
.TP
.B ls
list each resource's type, id, attributes, data lenght, and name
.TP
.BI "hexdump " resource
show an hexdump of
.IR resource 's
data
.TP
.BI import \fR| "export " resource " " file " \fR[" ext \fR]
import/export
.IR resource 's
data from/to
.I file.
The conversion which is performed
depends on the extension of the given filename.
This extenstion may be overriden by providing the
.IR ext argument.
.TP
.BI "edit " resource \fR[ ext \fR]
invoke an external editor to change
.IR resource 's
data
.TP
.B help
list available commands
.TP
.B exit
terminate rsrce
(without saving, use write before exit
if you wish to save your changes)
.SH CONVERSION OF RESOURCE DATA
When
.B rsrce
imports or exports resource data,
a conversion can be performed depending on the resource type
and the extension of the provided filename.
The following extensions are known to
.BR rsrce :
.TP
.B bin
causes no conversion,
the raw resource data is used
regardless of the resource type;
.TP
.B txt
causes the resource data to be converted to plain text.
This is possible for
.BR STR ", " STR# and CMDL resources.
.SH BUGS
Rsrce has only been originally created
to change the configuration of the
miBoot Linux bootloader for OldWorld
PowerMac computers.
Since I do not use MacOS, I haven't
tested any other usage of this program.
You should therefore be very careful
when using it, as it could very well
produce unusable output.
Another consequence of this is wildly
missing functionnality.
I'm not going to work on it, since I
couldn't test anything in a real
situation.
Patches and/or usage reports would be
very welcome.
.SH AUTHOR
Jeremie Koenig <[email protected]>
.SH SEE ALSO
.BR hfsutils (1),
.BR macutil (1)