There's no need for two separate sed calls here. --- eclass/python-utils-r1.eclass | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index e3cf82b4b58f..121f2382ba78 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1247,11 +1247,7 @@ python_fix_shebang() { if [[ ! ${error} ]]; then # We either want to match ${from} followed by space # or at end-of-string. - if [[ ${shebang} == *${from}" "* ]]; then - sed -i -e "1s:${from} :${EPYTHON} :" "${f}" || die - else - sed -i -e "1s:${from}$:${EPYTHON}:" "${f}" || die - fi + sed -i -e "1s:${from}\( \|\$\):${EPYTHON}\1:" "${f}" || die any_fixed=1 else eerror "The file has incompatible shebang:" -- 2.18.0