From: Amitai Schlair Date: Sun, 19 Oct 2014 16:59:53 +0000 (-0400) Subject: Match word boundary (think "/usr/bin/perl5.18"). X-Git-Tag: 3.20150107~126 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/9f04f8ccc58d8389efac84afe859b08edb8d4518?hp=f47af2b8c488f3426edd8181f72bf2177e267c73 Match word boundary (think "/usr/bin/perl5.18"). --- 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 diff --git a/doc/bugs/double_shebang_replacement___47__usr__47__bin__47__perl5.185.18.mdwn b/doc/bugs/double_shebang_replacement___47__usr__47__bin__47__perl5.185.18.mdwn index 9bccdf096..9f08f26d4 100644 --- a/doc/bugs/double_shebang_replacement___47__usr__47__bin__47__perl5.185.18.mdwn +++ b/doc/bugs/double_shebang_replacement___47__usr__47__bin__47__perl5.185.18.mdwn @@ -1,4 +1,4 @@ -Please consider this [patch] for merging in. +Please consider this [[patch]] for merging in. [[!format diff """ From e697ba4ef7952ce549d449c4e4daea2e3f0a1aa7 Mon Sep 17 00:00:00 2001 From: Nikolay Orlyuk @@ -36,3 +36,7 @@ index 61fe336..2d54658 100755 -- 2.1.2 """]] + +[[Done]], but this word-boundary construct didn't work on at least +one of my systems, so now we're using `$(PERL)` to do the job +portably.