7b16300c8f
Arguments are passed through to kayobe-env in kayobe-config, which allows to set the Kayobe environment. Change-Id: I4c72e32e5379237340284a09874b0c500e41ad0f
31 lines
727 B
Bash
Executable File
31 lines
727 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Save the current shell options.
|
|
oldstate=$(set +o)
|
|
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
# 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
|
|
|
|
# Arguments passed to this script are passed through to the kayobe-env script
|
|
# in kayobe-config. This can be used to set the Kayobe environment.
|
|
|
|
PARENT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
source "${PARENT}/functions"
|
|
|
|
|
|
function main {
|
|
config_init
|
|
environment_setup "$@"
|
|
}
|
|
|
|
main "$@"
|
|
|
|
# Restore previous shell options.
|
|
eval "$oldstate"
|