From 9f04f8ccc58d8389efac84afe859b08edb8d4518 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 19 Oct 2014 12:59:53 -0400 Subject: Match word boundary (think "/usr/bin/perl5.18"). --- Makefile.PL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 61fe336b8..312a1482c 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -63,7 +63,7 @@ docwiki: perl_shebangs: ifneq "$(PERL)" "/usr/bin/perl" for file in $(shebang_scripts); do \ - $(SED) -e "1s|^#!/usr/bin/perl|#!$(PERL)|" < $$file > "$$file.new"; \ + $(PERL) -pe "s|^#!/usr/bin/perl\b|#!$(PERL)| if 1" < $$file > "$$file.new"; \ [ -x $$file ] && chmod +x "$$file.new"; \ mv -f "$$file.new" $$file; \ done @@ -72,7 +72,7 @@ endif perl_shebangs_clean: ifneq "$(PERL)" "/usr/bin/perl" for file in $(shebang_scripts); do \ - $(SED) -e "1s|^#!$(PERL)|#!/usr/bin/perl|" < $$file > "$$file.new"; \ + $(PERL) -pe "s|^#!$(PERL)\b|#!/usr/bin/perl| if 1" < $$file > "$$file.new"; \ [ -x $$file ] && chmod +x "$$file.new"; \ mv -f "$$file.new" $$file; \ done -- cgit v1.2.3