1 |
On Tuesday 15 April 2008, Marijn Schouten (hkBst) wrote: |
2 |
> Hi list, |
3 |
> |
4 |
> it seems I have been using some fragile sed expression and I'd like to tap |
5 |
> the collective wisdom for avoiding doing that in the future. |
6 |
> |
7 |
> dev-scheme/slib-3.1.5-r1 currently does |
8 |
> |
9 |
> sed "s_prefix = /usr/local/_prefix = ${D}/usr/_" -i Makefile |
10 |
|
11 |
ignoring the escape character (which is currently standardized in the tree as |
12 |
a colon), expressions like this are inherently fragile due to makefile |
13 |
changes. i tend to do: |
14 |
sed -i '/^prefix[[:space:]]*=/s:=.*:=/usr' Makefile |
15 |
-mike |