vcpkg/ports/openssl/unix/configure
Alonso Schaich 4a3c366f2d
[openssl] Use bash from PATH rather then /bin (#32289)
* [openssl] Use bash from PATH rather then /bin (microsoft/vcpkg#32288)

The configure script used to invoke python during the build process contains
a shebang that invokes /bin/bash independend of whatever bash would usually
resolve to.

This breaks compilation on FreeBSD, where bash isn't part of the operating
system.

Rather then /bin/bash, invoke /usr/bin/env bash, which resolves the bash
command by iterating PATH

* [openssl] regenerate versions registries (microsoft/vcpkg#32288)
2023-06-30 17:37:52 -07:00

32 lines
565 B
Bash
Executable File

#!/usr/bin/env bash
set -e
declare -a OUT_OPTIONS
INTERPRETER=perl
LAST_SEEN=
COPY_OPTIONS=no
for OPTION; do
case "${OPTION},${COPY_OPTIONS}" in
*/Configure,no)
OUT_OPTIONS+=("${OPTION}")
INTERPRETER="${LAST_SEEN}"
COPY_OPTIONS=yes
;;
--prefix=*|--openssldir=*|--libdir=*|--cross-compile-prefix=*|--debug,*)
OUT_OPTIONS+=("${OPTION}")
;;
-*|*=*)
;;
*,yes)
OUT_OPTIONS+=("${OPTION}")
;;
esac
LAST_SEEN="${OPTION}"
done
set -x
"${INTERPRETER}" ${OUT_OPTIONS[@]}