[Buildroot] [RFC PATCH v5 07/11] support/scripts: add reloacte-sdk.sh script for SDK relocation

Arnout Vandecappelle arnout at mind.be
Tue Jul 4 10:06:59 UTC 2017



On 04-07-17 09:14, Samuel Martin wrote:
> Wolfgang,
> 
> On Tue, Jul 4, 2017 at 9:01 AM, Wolfgang Grandegger <wg at grandegger.com> wrote:
>>
>> Am 04.07.2017 um 00:01 schrieb Arnout Vandecappelle:
>>>
>>>   Type in the subject: reloacte -> relocate
>>>
>>> On 30-06-17 10:37, Wolfgang Grandegger wrote:
> [...]
>>>> +newpath="$(sed -e "s\\${OLDPATH}\\${NEWPATH}\\g" "${LOCFILE}")"
>>>
>>>
>>>   \\ is a bit a weird sed separator... We use % mostly, sometimes @ or ,.
>>> But I'd
>>> advise %.
>>
>>
>> "%" and "@" are legal character of a file name. That's why I have chosen
>> "\".
> 
> I think youcan choose one of the characters from [1] (my preference
> would be either ':' or '|').
> 
> [1] https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words

 Not a great reference. The only characters that are not allowed in Unix path
names are / and \0. Neither of them is usable for the sed replacement.

 However, Buildroot will break down if the output dir contains strange
characters. Admittedly the external toolchain dir is probably more robust. But
we already have plenty of sed replacements using % and some with @ or , or :.

 So I've discussed it here at the Summer Camp and basically everyone has a
different opinion. Since this patch is basically ready to go in (after fixing up
the type in the subject), whoever commits it will replace the \\ with their
preference.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF



More information about the buildroot mailing list