scripts/config: use sed's POSIX interface
authorClement Chauplannaz <chauplac@gmail.com>
Sat, 13 Jul 2013 14:36:56 +0000 (16:36 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Thu, 15 Aug 2013 20:48:07 +0000 (22:48 +0200)
commit83e8b90e1d2cc5ff5d2443f2486c2d786a4997ce
tree9d57d3bee9b3de3a623ab52bd2e4a14a9289b5ba
parent129784abc982ccac43322c2f175f3ca735c2ca73
scripts/config: use sed's POSIX interface

Script `config' relies on extensions of `GNU sed', and is thus not
working on all Unixes:
  - in-place edition of files (-i), which can be replaced with
    a temporary file;
  - extended-regexps (-r), which can be split into basic regexps;
  - single-line calls to `a' command, while some implementations
    require a leading newline before the parameter.

Rewrite calls to `sed' to comply with POSIX interface, and move them
to helper functions.

Signed-off-by: Clement Chauplannaz <chauplac@gmail.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
scripts/config