From 4313a5b4c51e2093f1b45ef9845fc77d32b09330 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 16 Oct 2019 22:19:48 -0400 Subject: Detect if sed supports --in-place Not all versions of sed have the --in-place flag. Detect support for the flag during ./configure and provide a fallback mechanism for those systems where sed's behavior differs. The autoconf variable ${ac_inplace} can be used to choose the correct flags for editing a file in place with sed. Replace violating usages in Makefile.am with ${ac_inplace}. Reviewed-by: Chris Dunlop Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #9463 --- cmd/dbufstat/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/dbufstat') diff --git a/cmd/dbufstat/Makefile.am b/cmd/dbufstat/Makefile.am index a3f0c6e50..10c9fbabb 100644 --- a/cmd/dbufstat/Makefile.am +++ b/cmd/dbufstat/Makefile.am @@ -8,6 +8,6 @@ dist_bin_SCRIPTS = dbufstat # if USING_PYTHON_2 install-exec-hook: - sed --in-place 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \ + sed ${ac_inplace} -e 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \ $(DESTDIR)$(bindir)/dbufstat endif -- cgit v1.2.3