From cdbfdd8da86be37e9150f55982c291f4a02e2ecb Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Wed, 28 Mar 2018 17:15:36 -0700 Subject: protoc-artifacts: Use ENTRYPOINT to enable devtoolset-1.1 ENTRYPOINT is used even when other commands are specified on the "docker run" command line. This allows running one-off commands in the docker image (especially combined with volume binding with the host) with the correct environment variables. --- protoc-artifacts/scl-enable-devtoolset.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 protoc-artifacts/scl-enable-devtoolset.sh (limited to 'protoc-artifacts/scl-enable-devtoolset.sh') diff --git a/protoc-artifacts/scl-enable-devtoolset.sh b/protoc-artifacts/scl-enable-devtoolset.sh new file mode 100755 index 00000000..8d9585ea --- /dev/null +++ b/protoc-artifacts/scl-enable-devtoolset.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -eu -o pipefail + +quote() { + local arg + for arg in "$@"; do + printf "'" + printf "%s" "$arg" | sed -e "s/'/'\\\\''/g" + printf "' " + done +} + +exec scl enable devtoolset-1.1 "$(quote "$@")" -- cgit v1.2.3