diff options
-rwxr-xr-x | bin/ebuild.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index a68b9731..2affc923 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -480,8 +480,8 @@ econf() { : ${ECONF_SOURCE:=.} if [ -x "${ECONF_SOURCE}/configure" ]; then if [[ -n $CONFIG_SHELL && \ - "$(head -n1 "$ECONF_SOURCE/configure")" =~ ^'#!'[[:space:]]*/bin/sh[[:space:]]*$ ]] ; then - sed -e "1s:.*:#!$CONFIG_SHELL" -i "$ECONF_SOURCE/configure" || \ + "$(head -n1 "$ECONF_SOURCE/configure")" =~ ^'#!'[[:space:]]*/bin/sh([[:space:]]|$) ]] ; then + sed -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" -i "$ECONF_SOURCE/configure" || \ die "Substition of shebang in '$ECONF_SOURCE/configure' failed" fi if [ -e /usr/share/gnuconfig/ ]; then |