Comment 3 for bug 379814

Revision history for this message
Nate Michael (nate-michael) wrote : Re: [Bug 379814] Re: gen_action_registry.sh incorrectly generates Action Registry

Hi Staffan,

> class="$(echo $f | sed --posix "s/^actions\/\(\w\{0,\}\)\.hh/\1/g")"
> id="$(echo $foo | sed --posix "s/
> PEEKABOT_REGISTER_SERIALIZABLE[[:space:]]\{1,\}//g")"

This does not work, --posix is not a valid flag. I also tried the
other suggested method:

> Does the original code work if you use "sed -E" instead?

which returns undesired values.

How about the following:

 class="$(echo $f | sed "s:actions\/*::" | sed "s:\([a-zA-Z]\)\.hh:
\1:g")"
 id="$(echo $foo | sed "s/[a-zA-Z_ ]*//g")"

I tried this on OS X and Debian linux and both worked.

Nate