1 |
On śro, 2017-04-19 at 18:21 +0200, Ulrich Mueller wrote: |
2 |
> > > > > > On Wed, 19 Apr 2017, Ulrich Mueller wrote: |
3 |
> > > +if [[ ${target:0:1} == "/" && ${target} != "${EPREFIX}"* ]]; then |
4 |
> > I think you want an additional slash in the second condition, in order |
5 |
> > to prevent /foo/barbaz from matching if EPREFIX is equal to /foo/bar: |
6 |
> > if [[ ${target:0:1} == "/" && ${target}/ != "${EPREFIX}"/* ]]; then |
7 |
> > > + target="${EPREFIX}${target}" |
8 |
> |
9 |
> One more point, maybe output a QA warning here? |
10 |
|
11 |
Not convinced about that. Two points: |
12 |
|
13 |
1. It will warn only people actually running Prefix. |
14 |
|
15 |
2. It will also trigger for paths that aren't supposed to be prefixed. |
16 |
|
17 |
> |
18 |
> > > +fi |
19 |
> > > ln -snf "${target}" "${ED}${2}" |
20 |
> > > |
21 |
> > > ret=$? |
22 |
> |
23 |
> Ulrich |
24 |
|
25 |
-- |
26 |
Best regards, |
27 |
Michał Górny |