2017-10-21 09:33:34 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-01-29 17:29:29 +00:00
|
|
|
# Save the current shell options.
|
|
|
|
oldstate=$(set +o)
|
|
|
|
|
2018-02-06 12:06:00 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
2017-10-21 09:33:34 +01:00
|
|
|
|
|
|
|
# This script can be used to prepare the environment for use with kayobe. This
|
|
|
|
# includes setting environment variables and activating the python virtual
|
|
|
|
# environment. This script should be sourced rather than executed in a
|
|
|
|
# subprocess. e.g. source dev/environment-setup.sh
|
|
|
|
|
|
|
|
PARENT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
2018-02-06 12:06:00 +00:00
|
|
|
source "${PARENT}/functions"
|
2017-10-21 09:33:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
function main {
|
|
|
|
config_init
|
|
|
|
environment_setup
|
|
|
|
}
|
|
|
|
|
|
|
|
main
|
2019-01-29 17:29:29 +00:00
|
|
|
|
|
|
|
# Restore previous shell options.
|
|
|
|
eval "$oldstate"
|