Last active
September 28, 2016 19:46
-
-
Save parabuzzle/e525dc564d7fc8bf83d189ae919ae56b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Wraps a command in the warm and cozy shell we want | |
# | |
# Author:: Michael Heijmans (mailto:[email protected]) | |
# Copyright:: Copyright (c) 2016 Michael Heijmans | |
# License:: MIT | |
set -e | |
echo -e "Establishing the environment for $APP_ENV from $VAULT_ADDR" | |
export APP_ENV_MAP=${APP_ENV_FILE:-/tmp/app_env} | |
# raise an error if there is no vault token | |
if [ -z $VAULT_TOKEN ]; then | |
echo "no VAULT_TOKEN set!" | |
exit 1 | |
fi | |
source $APP_ENV_MAP | |
echo -e "Finished establishing the environment for $APP_ENV from $VAULT_ADDR" | |
$@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment