1 |
commit: 35525e096061c33b9c10cfb2b0312846b4b0b9fe |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 16 23:32:47 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 16 23:32:47 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=35525e09 |
7 |
|
8 |
use `sed -E -i.tmp` everywhere |
9 |
|
10 |
POSIX is adding the -E flag to enable ERE behavior, and GNU/sed already |
11 |
supports this, as do various BSD systems (including OS X). |
12 |
|
13 |
While GNU makes the suffix to -i optional, POSIX/etc... do not, so make |
14 |
sure we always specify it. |
15 |
|
16 |
Makefile | 3 ++- |
17 |
lddtree.sh | 2 +- |
18 |
man/Makefile | 3 ++- |
19 |
tests/source/space | 2 +- |
20 |
4 files changed, 6 insertions(+), 4 deletions(-) |
21 |
|
22 |
diff --git a/Makefile b/Makefile |
23 |
index 26cc9d4..b3782a6 100644 |
24 |
--- a/Makefile |
25 |
+++ b/Makefile |
26 |
@@ -163,7 +163,8 @@ GEN_MARK_END = \# @@@ GEN END @@@ \# |
27 |
EXTRA_DIST = $(shell git ls-files) |
28 |
autotools-update: |
29 |
$(MAKE) -C man -j |
30 |
- sed -i '/^$(GEN_MARK_START)$$/,/^$(GEN_MARK_END)$$/d' Makefile.am |
31 |
+ sed -i.tmp '/^$(GEN_MARK_START)$$/,/^$(GEN_MARK_END)$$/d' Makefile.am |
32 |
+ @rm -f Makefile.am.tmp |
33 |
( \ |
34 |
echo "$(GEN_MARK_START)"; \ |
35 |
printf 'dist_man_MANS +='; \ |
36 |
|
37 |
diff --git a/lddtree.sh b/lddtree.sh |
38 |
index 8e6501f..96163e3 100755 |
39 |
--- a/lddtree.sh |
40 |
+++ b/lddtree.sh |
41 |
@@ -42,7 +42,7 @@ elf_specs() { |
42 |
# LINUX and GNU are the same thing, as are NONE and SYSV, so normalize |
43 |
# GNU & LINUX to NONE. #442024 #464380 |
44 |
scanelf -BF '#F%a %M %D %I' "$1" | \ |
45 |
- sed -r 's: (LINUX|GNU)$: NONE:' |
46 |
+ sed -E 's: (LINUX|GNU)$: NONE:' |
47 |
} |
48 |
|
49 |
lib_paths_fallback="${ROOT}lib* ${ROOT}usr/lib* ${ROOT}usr/local/lib*" |
50 |
|
51 |
diff --git a/man/Makefile b/man/Makefile |
52 |
index 5332962..6f1f185 100644 |
53 |
--- a/man/Makefile |
54 |
+++ b/man/Makefile |
55 |
@@ -4,7 +4,8 @@ XMLTO_FLAGS_man = -x custom.xsl --skip-validation |
56 |
man pdf txt xhtml xhtml-nochunks: |
57 |
@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" |
58 |
@# scanelf.1 has funky indented lists ... hack it back |
59 |
- @sed -i 's:^[.]TP 4:.TP 2:' scanelf.1 |
60 |
+ @sed -i.tmp 's:^[.]TP 4:.TP 2:' scanelf.1 |
61 |
+ @rm scanelf.1.tmp |
62 |
clean distclean: |
63 |
rm -f *.1 *.html |
64 |
|
65 |
|
66 |
diff --git a/tests/source/space b/tests/source/space |
67 |
index 530c273..9626c0c 100755 |
68 |
--- a/tests/source/space |
69 |
+++ b/tests/source/space |
70 |
@@ -11,7 +11,7 @@ if [ $# != 1 ] ; then |
71 |
EOF |
72 |
fi |
73 |
|
74 |
-sed -r '/[[:space:]]+$/s:[[:space:]]+$::' "$i" | \ |
75 |
+sed -E '/[[:space:]]+$/s:[[:space:]]+$::' "$i" | \ |
76 |
awk '{ |
77 |
if (NF == 0) { |
78 |
while (NF == 0) |