summaryrefslogtreecommitdiff
path: root/hacking/env-setup
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2015-01-18 08:16:55 -0800
committerToshio Kuratomi <toshio@fedoraproject.org>2015-01-18 08:17:37 -0800
commit365af69c3ee8cbbc1585f97b85b921bc05ce7b91 (patch)
treee0b0d7457a60bac8f32eb9a4cb755f1c2a134610 /hacking/env-setup
parented891c76f66913b7041fa09e7aed521d4ec6f079 (diff)
downloadansible-365af69c3ee8cbbc1585f97b85b921bc05ce7b91.tar.gz
More quotes and reimplement without pushd/popd
Diffstat (limited to 'hacking/env-setup')
-rw-r--r--hacking/env-setup31
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 ""