#!/bin/bash set -o errexit \ -o nounset \ -o pipefail ROOT="$(realpath "${BASH_SOURCE}")" # -> /releng/protoc-gen ROOT="$(dirname "${ROOT}")" # -> /releng/ ROOT="$(dirname "${ROOT}")" # -> / ( # Since this script is run outside of a docker container, it is # possible that one (or more) of the following executables is # not installed. set -x which docker which sudo which yq ) 1>/dev/null CROSS_BUILDER_VERSION="$(yq -e eval '.parameters.cross-container-tag.default' "${ROOT}/.circleci/config.yml")" # Updating ownership within the container requires both the "UID" and "GID" # of the current user. Since the current user does not exist within the # container, "${USER}:" cannot be supplied to `chown`. USER_UID="$(id -u)" USER_GID="$(id -g)" read -d '' DOCKERSCRIPT <