Merge pull request #15630 from brettinman/devel
Make -q flag totally quiet for env-setup.fish
This commit is contained in:
commit
258d6fcddf
1 changed files with 32 additions and 20 deletions
|
@ -8,6 +8,15 @@ set PREFIX_PYTHONPATH $ANSIBLE_HOME/lib
|
||||||
set PREFIX_PATH $ANSIBLE_HOME/bin
|
set PREFIX_PATH $ANSIBLE_HOME/bin
|
||||||
set PREFIX_MANPATH $ANSIBLE_HOME/docs/man
|
set PREFIX_MANPATH $ANSIBLE_HOME/docs/man
|
||||||
|
|
||||||
|
# set quiet flag
|
||||||
|
if set -q argv
|
||||||
|
switch $argv
|
||||||
|
case '-q' '--quiet'
|
||||||
|
set QUIET "true"
|
||||||
|
case '*'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Set PYTHONPATH
|
# Set PYTHONPATH
|
||||||
if not set -q PYTHONPATH
|
if not set -q PYTHONPATH
|
||||||
set -gx PYTHONPATH $PREFIX_PYTHONPATH
|
set -gx PYTHONPATH $PREFIX_PYTHONPATH
|
||||||
|
@ -15,7 +24,9 @@ else
|
||||||
switch PYTHONPATH
|
switch PYTHONPATH
|
||||||
case "$PREFIX_PYTHONPATH*"
|
case "$PREFIX_PYTHONPATH*"
|
||||||
case "*"
|
case "*"
|
||||||
|
if not [ $QUIET ]
|
||||||
echo "Appending PYTHONPATH"
|
echo "Appending PYTHONPATH"
|
||||||
|
end
|
||||||
set -gx PYTHONPATH "$PREFIX_PYTHONPATH:$PYTHONPATH"
|
set -gx PYTHONPATH "$PREFIX_PYTHONPATH:$PYTHONPATH"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -38,7 +49,11 @@ set -gx ANSIBLE_LIBRARY $ANSIBLE_HOME/library
|
||||||
|
|
||||||
# Generate egg_info so that pkg_resources works
|
# Generate egg_info so that pkg_resources works
|
||||||
pushd $ANSIBLE_HOME
|
pushd $ANSIBLE_HOME
|
||||||
python setup.py egg_info
|
if [ $QUIET ]
|
||||||
|
python setup.py -q egg_info
|
||||||
|
else
|
||||||
|
python setup.py egg_info
|
||||||
|
end
|
||||||
if test -e $PREFIX_PYTHONPATH/ansible*.egg-info
|
if test -e $PREFIX_PYTHONPATH/ansible*.egg-info
|
||||||
rm -r $PREFIX_PYTHONPATH/ansible*.egg-info
|
rm -r $PREFIX_PYTHONPATH/ansible*.egg-info
|
||||||
end
|
end
|
||||||
|
@ -47,10 +62,7 @@ find . -type f -name "*.pyc" -delete
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
if set -q argv
|
if not [ $QUIET ]
|
||||||
switch $argv
|
|
||||||
case '-q' '--quiet'
|
|
||||||
case '*'
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Setting up Ansible to run out of checkout..."
|
echo "Setting up Ansible to run out of checkout..."
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -59,10 +71,10 @@ if set -q argv
|
||||||
echo "ANSIBLE_LIBRARY=$ANSIBLE_LIBRARY"
|
echo "ANSIBLE_LIBRARY=$ANSIBLE_LIBRARY"
|
||||||
echo "MANPATH=$MANPATH"
|
echo "MANPATH=$MANPATH"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "Remember, you may wish to specify your host file with -i"
|
echo "Remember, you may wish to specify your host file with -i"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
echo ""
|
echo ""
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
set -e QUIET
|
||||||
|
|
Loading…
Reference in a new issue