1 |
On 04/21/2015 12:08 PM, Michael Orlitzky wrote: |
2 |
> On 04/21/2015 01:28 PM, Zac Medico wrote: |
3 |
>>> |
4 |
>>> The docs for INSTALL_MASK (man 5 make.conf) don't mention that globs |
5 |
>>> will work. It's expecting a "space delimited list of file names." Does |
6 |
>>> it really take a space-delimited list of globs instead? If so, how does |
7 |
>>> that reconcile with the fact that * could match spaces? |
8 |
>> |
9 |
>> How does it conflict? |
10 |
>> |
11 |
> |
12 |
> I guess it's more of a filenames-with-spaces question. Would this work? |
13 |
> |
14 |
> INSTALL_MASK="Boyd\ -\ Convex Optimization.pdf" |
15 |
|
16 |
No, it doesn't seem to work given the current code. For example: |
17 |
|
18 |
$ INSTALL_MASK="Boyd\ -\ Convex Optimization.pdf" |
19 |
$ for x in $INSTALL_MASK; do echo "$x" ; done |
20 |
Boyd\ |
21 |
-\ |
22 |
Convex |
23 |
Optimization.pdf |
24 |
|
25 |
> If you can escape the spaces, then the space-separated globs aren't |
26 |
> ambiguous. I was thinking of something like this: |
27 |
> |
28 |
> $ /bin/ls B*\ Convex* |
29 |
> Boyd - Convex Optimization.pdf |
30 |
> |
31 |
> Normally if you stick something like that in a quoted variable, its |
32 |
> spaces can be unescaped: |
33 |
> |
34 |
> INSTALL_MASK="B* Convex*" |
35 |
> |
36 |
> But now it's two globs instead of one. The whole thing makes sense if |
37 |
> you can leave the space escaped though. |
38 |
|
39 |
I don't think the inventor of INSTALL_MASK thought about these kinds of |
40 |
cases. |
41 |
-- |
42 |
Thanks, |
43 |
Zac |