diff options
author | Robert Speicher <robert@gitlab.com> | 2017-03-21 18:32:58 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-03-21 18:37:04 +0300 |
commit | bb7046c7a756c19a014331a9e0bc51f889c54f7f (patch) | |
tree | 38dddbad4abf5d3eb750199db6c95a1bf267dc6a /bin | |
parent | 37a004f4d9772301b063bcff6d9fd70f63b9f447 (diff) |
Merge branch 'gitaly-install-rake' into 'master'
Docs and scripts to install Gitaly from source
Closes gitaly#136 and #28446
See merge request !9941
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/with_env | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/with_env b/bin/with_env new file mode 100755 index 00000000000..e678fa2f0cc --- /dev/null +++ b/bin/with_env @@ -0,0 +1,16 @@ +#!/bin/sh +# Usage: with_env ENV_FILE COMMAND [ARGS...] +# +# This script lets you modify the environment of an executable before +# launching it. It uses an 'env file' which must contain lines like +# 'MY_VARIABLE="my value"'. +# +env_file=$1 +shift + +# Use set -a to export all variables defined in env_file. +set -a +. "${env_file}" +set +a + +exec "$@" |