diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2015-01-18 08:16:55 -0800 |
---|---|---|
committer | Toshio Kuratomi <toshio@fedoraproject.org> | 2015-01-18 08:17:37 -0800 |
commit | 365af69c3ee8cbbc1585f97b85b921bc05ce7b91 (patch) | |
tree | e0b0d7457a60bac8f32eb9a4cb755f1c2a134610 /hacking/env-setup | |
parent | ed891c76f66913b7041fa09e7aed521d4ec6f079 (diff) | |
download | ansible-365af69c3ee8cbbc1585f97b85b921bc05ce7b91.tar.gz |
More quotes and reimplement without pushd/popd
Diffstat (limited to 'hacking/env-setup')
-rw-r--r-- | hacking/env-setup | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/hacking/env-setup b/hacking/env-setup index ae465ed45d..f8b973b1a4 100644 --- a/hacking/env-setup +++ b/hacking/env-setup @@ -36,31 +36,28 @@ expr "$MANPATH" : "${PREFIX_MANPATH}.*" > /dev/null || export MANPATH="$PREFIX_M gen_egg_info() { python setup.py egg_info - if [ -e $PREFIX_PYTHONPATH/ansible*.egg-info ] ; then - rm -r $PREFIX_PYTHONPATH/ansible*.egg-info + if [ -e "$PREFIX_PYTHONPATH/ansible*.egg-info" ] ; then + rm -r "$PREFIX_PYTHONPATH/ansible*.egg-info" fi - mv ansible*.egg-info $PREFIX_PYTHONPATH + mv "ansible*.egg-info" "$PREFIX_PYTHONPATH" } -# In some shells if pushd is a no-op then popd sends you to a previous -# directory in history if [ "$ANSIBLE_HOME" != "$PWD" ] ; then - pushd "$ANSIBLE_HOME" - if [ "$VERBOSITY" = "-q" ] ; then - gen_egg_info 2>1 1> /dev/null - else - gen_egg_info - fi - popd + current_dir="$PWD" else - if [ "$VERBOSITY" = "-q" ] ; then - gen_egg_info 2>1 1> /dev/null - else - gen_egg_info - fi + current_dir="$ANSIBLE_HOME" +fi +cd "$ANSIBLE_HOME" +if [ "$VERBOSITY" = "-q" ] ; then + gen_egg_info 2>1 1> /dev/null +else + gen_egg_info fi +cd "$current_dir" +# # Print out values unless -q is set +# if [ "$VERBOSITY" != "-q" ] ; then echo "" |