1 |
>>>>> On Thu, 16 Aug 2012, Micha³ Górny wrote: |
2 |
|
3 |
>> > +dointo() { |
4 |
>> > + [[ ${#} -gt 2 ]] || die 'Synopsis: dointo <directory> |
5 |
>> > <file> [...]' + |
6 |
>> > + local directory=${1} |
7 |
>> > + shift |
8 |
>> > + |
9 |
>> > + ( |
10 |
>> > + insinto "${directory}" |
11 |
>> |
12 |
>> Shouldn't there be checking for errors here, for the case that insinto |
13 |
>> fails? |
14 |
|
15 |
> Hmm, I don't even know if insinto should ever fail. |
16 |
|
17 |
It can fail if the underlying "install -d" fails, e.g. if a regular |
18 |
file is in the way of the directory to be created. |
19 |
|
20 |
> And if it does, then the following doins should fail as well, I |
21 |
> guess. |
22 |
|
23 |
Normally I also don't add any error checks for insinto in ebuilds. |
24 |
But for a general eclass function, chances are higher that something |
25 |
goes wrong. For example, arguments may be specified in the wrong |
26 |
order. So some extra error checking cannot harm (and is cheap). |
27 |
|
28 |
Ulrich |