21 lines
401 B
Bash
Executable File
21 lines
401 B
Bash
Executable File
#!/bin/sh
|
|
set -ef
|
|
|
|
__have_args="${ENVSUBST_ARGS:+1}"
|
|
if [ -z "${__have_args}" ] ; then
|
|
## optimize envsubst-single invocation by caching argument list
|
|
## ref: envsubst-single
|
|
ENVSUBST_ARGS=$(mktemp)
|
|
envsubst-args.sh > "${ENVSUBST_ARGS}"
|
|
export ENVSUBST_ARGS
|
|
fi
|
|
|
|
set +e ; __ret=0
|
|
for i ; do
|
|
envsubst-single "$i" || __ret=1
|
|
done
|
|
|
|
[ -n "${__have_args}" ] || rm -f "${ENVSUBST_ARGS}"
|
|
|
|
exit ${__ret}
|