commit:     35525e096061c33b9c10cfb2b0312846b4b0b9fe
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 16 23:32:47 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Dec 16 23:32:47 2015 +0000
URL:        https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=35525e09

use `sed -E -i.tmp` everywhere

POSIX is adding the -E flag to enable ERE behavior, and GNU/sed already
supports this, as do various BSD systems (including OS X).

While GNU makes the suffix to -i optional, POSIX/etc... do not, so make
sure we always specify it.

 Makefile           | 3 ++-
 lddtree.sh         | 2 +-
 man/Makefile       | 3 ++-
 tests/source/space | 2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 26cc9d4..b3782a6 100644
--- a/Makefile
+++ b/Makefile
@@ -163,7 +163,8 @@ GEN_MARK_END   = \# @@@ GEN END @@@ \#
 EXTRA_DIST     = $(shell git ls-files)
 autotools-update:
        $(MAKE) -C man -j
-       sed -i '/^$(GEN_MARK_START)$$/,/^$(GEN_MARK_END)$$/d' Makefile.am
+       sed -i.tmp '/^$(GEN_MARK_START)$$/,/^$(GEN_MARK_END)$$/d' Makefile.am
+       @rm -f Makefile.am.tmp
        ( \
                echo "$(GEN_MARK_START)"; \
                printf 'dist_man_MANS +='; \

diff --git a/lddtree.sh b/lddtree.sh
index 8e6501f..96163e3 100755
--- a/lddtree.sh
+++ b/lddtree.sh
@@ -42,7 +42,7 @@ elf_specs() {
        # LINUX and GNU are the same thing, as are NONE and SYSV, so normalize
        # GNU & LINUX to NONE. #442024 #464380
        scanelf -BF '#F%a %M %D %I' "$1" | \
-               sed -r 's: (LINUX|GNU)$: NONE:'
+               sed -E 's: (LINUX|GNU)$: NONE:'
 }
 
 lib_paths_fallback="${ROOT}lib* ${ROOT}usr/lib* ${ROOT}usr/local/lib*"

diff --git a/man/Makefile b/man/Makefile
index 5332962..6f1f185 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -4,7 +4,8 @@ XMLTO_FLAGS_man = -x custom.xsl --skip-validation
 man pdf txt xhtml xhtml-nochunks:
        @xmlto $@ $(XMLTO_FLAGS_$@) pax-utils.docbook || echo "If this failed, 
you probably need to emerge ~app-text/docbook-xml-dtd-4.4 app-text/xmlto 
dev-tex/xmltex"
        @# scanelf.1 has funky indented lists ... hack it back
-       @sed -i 's:^[.]TP 4:.TP 2:' scanelf.1
+       @sed -i.tmp 's:^[.]TP 4:.TP 2:' scanelf.1
+       @rm scanelf.1.tmp
 clean distclean:
        rm -f *.1 *.html
 

diff --git a/tests/source/space b/tests/source/space
index 530c273..9626c0c 100755
--- a/tests/source/space
+++ b/tests/source/space
@@ -11,7 +11,7 @@ if [ $# != 1 ] ; then
        EOF
 fi
 
-sed -r '/[[:space:]]+$/s:[[:space:]]+$::' "$i" | \
+sed -E '/[[:space:]]+$/s:[[:space:]]+$::' "$i" | \
        awk '{
        if (NF == 0) {
                while (NF == 0)

Reply via email to