The idea is that scripts directly under Meta are meant to be run by people. Scripts that are only imported or run by other scripts are moved to a subdirectory.
22 lines
438 B
Bash
22 lines
438 B
Bash
# shellcheck shell=bash
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
pick_host_compiler() {
|
|
local output
|
|
local status
|
|
|
|
output=$("${DIR}/find_compiler.py" "$@")
|
|
status=$?
|
|
|
|
if [[ ${status} -ne 0 ]] ; then
|
|
exit ${status}
|
|
fi
|
|
|
|
if [[ "${output}" != *"CC="* || "${output}" != *"CXX="* ]] ; then
|
|
echo "Unexpected output from find_compiler.py"
|
|
exit 1
|
|
fi
|
|
|
|
eval "${output}"
|
|
}
|