summaryrefslogtreecommitdiff
path: root/hacking
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2015-01-15 11:08:00 -0800
committerToshio Kuratomi <toshio@fedoraproject.org>2015-01-15 11:08:00 -0800
commitdde32a826f0b071cf8829b3d8fa2caed6684feb6 (patch)
tree454e1d6a2855b84a2049786581b4b9bcc57670ac /hacking
parent1b8faa68d99f2f1f373df4ce43e6c2ff71d81257 (diff)
downloadansible-dde32a826f0b071cf8829b3d8fa2caed6684feb6.tar.gz
Set default values for shell variables that we use
Fixes #9991
Diffstat (limited to 'hacking')
-rw-r--r--hacking/env-setup20
1 files changed, 17 insertions, 3 deletions
diff --git a/hacking/env-setup b/hacking/env-setup
index 6b19f46510..ae465ed45d 100644
--- a/hacking/env-setup
+++ b/hacking/env-setup
@@ -1,6 +1,12 @@
# usage: source ./hacking/env-setup [-q]
# 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
if [ -n "$BASH_SOURCE" ] ; then
HACKING_DIR=$(dirname "$BASH_SOURCE")
@@ -40,15 +46,23 @@ gen_egg_info()
# directory in history
if [ "$ANSIBLE_HOME" != "$PWD" ] ; then
pushd "$ANSIBLE_HOME"
- gen_egg_info
+ if [ "$VERBOSITY" = "-q" ] ; then
+ gen_egg_info 2>1 1> /dev/null
+ else
+ gen_egg_info
+ fi
popd
else
- gen_egg_info
+ 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
-if [ $# -eq 0 -o "$1" != "-q" ] ; then
+if [ "$VERBOSITY" != "-q" ] ; then
echo ""
echo "Setting up Ansible to run out of checkout..."
echo ""