mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
1b8faa68d9
commit
dde32a826f
2 changed files with 34 additions and 6 deletions
|
@ -1,6 +1,12 @@
|
||||||
# usage: source ./hacking/env-setup [-q]
|
# usage: source ./hacking/env-setup [-q]
|
||||||
# modifies environment for running Ansible from checkout
|
# modifies environment for running Ansible from checkout
|
||||||
|
|
||||||
|
# Default values for shell variables we use
|
||||||
|
PYTHONPATH=${PYTHONPATH-""}
|
||||||
|
PATH=${PATH-""}
|
||||||
|
MANPATH=${MANPATH-""}
|
||||||
|
VERBOSITY=${1-""}
|
||||||
|
|
||||||
# When run using source as directed, $0 gets set to bash, so we must use $BASH_SOURCE
|
# When run using source as directed, $0 gets set to bash, so we must use $BASH_SOURCE
|
||||||
if [ -n "$BASH_SOURCE" ] ; then
|
if [ -n "$BASH_SOURCE" ] ; then
|
||||||
HACKING_DIR=$(dirname "$BASH_SOURCE")
|
HACKING_DIR=$(dirname "$BASH_SOURCE")
|
||||||
|
@ -40,15 +46,23 @@ gen_egg_info()
|
||||||
# directory in history
|
# directory in history
|
||||||
if [ "$ANSIBLE_HOME" != "$PWD" ] ; then
|
if [ "$ANSIBLE_HOME" != "$PWD" ] ; then
|
||||||
pushd "$ANSIBLE_HOME"
|
pushd "$ANSIBLE_HOME"
|
||||||
gen_egg_info
|
if [ "$VERBOSITY" = "-q" ] ; then
|
||||||
popd
|
gen_egg_info 2>1 1> /dev/null
|
||||||
else
|
else
|
||||||
gen_egg_info
|
gen_egg_info
|
||||||
fi
|
fi
|
||||||
|
popd
|
||||||
|
else
|
||||||
|
if [ "$VERBOSITY" = "-q" ] ; then
|
||||||
|
gen_egg_info 2>1 1> /dev/null
|
||||||
|
else
|
||||||
|
gen_egg_info
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Print out values unless -q is set
|
# Print out values unless -q is set
|
||||||
|
|
||||||
if [ $# -eq 0 -o "$1" != "-q" ] ; then
|
if [ "$VERBOSITY" != "-q" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Setting up Ansible to run out of checkout..."
|
echo "Setting up Ansible to run out of checkout..."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
# usage: source ./hacking/env-setup [-q]
|
# usage: source ./hacking/env-setup [-q]
|
||||||
# modifies environment for running Ansible from checkout
|
# modifies environment for running Ansible from checkout
|
||||||
|
|
||||||
|
# Default values for shell variables we use
|
||||||
|
PYTHONPATH=${PYTHONPATH-""}
|
||||||
|
PATH=${PATH-""}
|
||||||
|
MANPATH=${MANPATH-""}
|
||||||
|
VERBOSITY=${1-""}
|
||||||
|
|
||||||
# When run using source as directed, $0 gets set to bash, so we must use $BASH_SOURCE
|
# When run using source as directed, $0 gets set to bash, so we must use $BASH_SOURCE
|
||||||
if [ -n "$BASH_SOURCE" ] ; then
|
if [ -n "$BASH_SOURCE" ] ; then
|
||||||
HACKING_DIR=$(dirname "$BASH_SOURCE")
|
HACKING_DIR=$(dirname "$BASH_SOURCE")
|
||||||
|
@ -40,15 +46,23 @@ gen_egg_info()
|
||||||
# directory in history
|
# directory in history
|
||||||
#if [ "$ANSIBLE_HOME" != "$PWD" ] ; then
|
#if [ "$ANSIBLE_HOME" != "$PWD" ] ; then
|
||||||
# pushd "$ANSIBLE_HOME"
|
# pushd "$ANSIBLE_HOME"
|
||||||
# gen_egg_info
|
# if [ "$VERBOSITY" = "-q" ] ; then
|
||||||
# popd
|
# gen_egg_info 2>1 1> /dev/null
|
||||||
# else
|
# else
|
||||||
# gen_egg_info
|
# gen_egg_info
|
||||||
# fi
|
# fi
|
||||||
|
# popd
|
||||||
|
#else
|
||||||
|
# if [ "$VERBOSITY" = "-q" ] ; then
|
||||||
|
# gen_egg_info 2>1 1> /dev/null
|
||||||
|
# else
|
||||||
|
# gen_egg_info
|
||||||
|
# fi
|
||||||
|
#fi
|
||||||
|
|
||||||
# Print out values unless -q is set
|
# Print out values unless -q is set
|
||||||
|
|
||||||
if [ $# -eq 0 -o "$1" != "-q" ] ; then
|
if [ "$VERBOSITY" != "-q" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Setting up Ansible to run out of checkout..."
|
echo "Setting up Ansible to run out of checkout..."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
Loading…
Reference in a new issue