1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Identified two verbosity levels: info, silent

Conflicts:
	hacking/env-setup
This commit is contained in:
Marco Ippolito 2015-01-18 20:07:04 +01:00 committed by Toshio Kuratomi
parent 9bc1e1a4a0
commit 7eb278e797

View file

@ -5,7 +5,11 @@
PYTHONPATH=${PYTHONPATH-""} PYTHONPATH=${PYTHONPATH-""}
PATH=${PATH-""} PATH=${PATH-""}
MANPATH=${MANPATH-""} MANPATH=${MANPATH-""}
verbosity=${1-""} verbosity=${1-info} # Defaults to `info' if unspecified
if [ "$verbosity" = -q ]; then
verbosity=silent
fi
# 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
@ -48,7 +52,7 @@ else
current_dir="$ANSIBLE_HOME" current_dir="$ANSIBLE_HOME"
fi fi
cd "$ANSIBLE_HOME" cd "$ANSIBLE_HOME"
if [ "$verbosity" = "-q" ] ; then if [ "$verbosity" = silent ] ; then
gen_egg_info 2>1 1> /dev/null gen_egg_info 2>1 1> /dev/null
else else
gen_egg_info gen_egg_info
@ -59,7 +63,7 @@ cd "$current_dir"
# Print out values unless -q is set # Print out values unless -q is set
# #
if [ "$verbosity" != "-q" ] ; then if [ "$verbosity" != silent ] ; then
echo "" echo ""
echo "Setting up Ansible to run out of checkout..." echo "Setting up Ansible to run out of checkout..."
echo "" echo ""