github.com/openshift/source-to-image@v1.4.1-0.20240516041539-bf52fc02204e/hack/build-cross.sh (about) 1 #!/bin/bash 2 3 # Build all cross compile targets and the base binaries 4 5 set -o errexit 6 set -o nounset 7 set -o pipefail 8 9 STARTTIME=$(date +%s) 10 S2I_ROOT=$(dirname "${BASH_SOURCE}")/.. 11 source "${S2I_ROOT}/hack/common.sh" 12 source "${S2I_ROOT}/hack/util.sh" 13 s2i::log::install_errexit 14 15 # Build the primary for all platforms 16 S2I_BUILD_PLATFORMS=("${S2I_CROSS_COMPILE_PLATFORMS[@]}") 17 s2i::build::build_binaries "${S2I_CROSS_COMPILE_TARGETS[@]}" 18 19 # Make the primary release. 20 S2I_RELEASE_ARCHIVE="source-to-image" 21 S2I_BUILD_PLATFORMS=("${S2I_CROSS_COMPILE_PLATFORMS[@]}") 22 s2i::build::place_bins "${S2I_CROSS_COMPILE_BINARIES[@]}" 23 24 ret=$?; ENDTIME=$(date +%s); echo "$0 took $(($ENDTIME - $STARTTIME)) seconds"; exit "$ret"