diff options
author | 2010-08-04 23:18:52 -0700 | |
---|---|---|
committer | 2010-08-04 23:18:52 -0700 | |
commit | b1e8c0e266cf875787cf44ee22458008845d22a4 (patch) | |
tree | 772fada0a193d7dbf5dac1d3ec30eff5653c9496 /bin | |
parent | Bug #330179 - Ensure that depgraph._show_unsatisfied_dep() only shows (diff) | |
download | portage-multirepo-b1e8c0e266cf875787cf44ee22458008845d22a4.tar.gz portage-multirepo-b1e8c0e266cf875787cf44ee22458008845d22a4.tar.bz2 portage-multirepo-b1e8c0e266cf875787cf44ee22458008845d22a4.zip |
Bug #308835 - Make econf() use sed to substitute $CONFIG_SHELL in
the shebang of configure scripts when appropriate.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 9c599c01..a68b9731 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -479,6 +479,11 @@ 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" || \ + die "Substition of shebang in '$ECONF_SOURCE/configure' failed" + fi if [ -e /usr/share/gnuconfig/ ]; then find "${WORKDIR}" -type f '(' \ -name config.guess -o -name config.sub ')' -print0 | \ |