More quotes and reimplement without pushd/popd

pull/10039/head
Toshio Kuratomi 10 years ago
parent ed891c76f6
commit 365af69c3e

@ -36,31 +36,28 @@ expr "$MANPATH" : "${PREFIX_MANPATH}.*" > /dev/null || export MANPATH="$PREFIX_M
gen_egg_info() gen_egg_info()
{ {
python setup.py egg_info python setup.py egg_info
if [ -e $PREFIX_PYTHONPATH/ansible*.egg-info ] ; then if [ -e "$PREFIX_PYTHONPATH/ansible*.egg-info" ] ; then
rm -r $PREFIX_PYTHONPATH/ansible*.egg-info rm -r "$PREFIX_PYTHONPATH/ansible*.egg-info"
fi 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 if [ "$ANSIBLE_HOME" != "$PWD" ] ; then
pushd "$ANSIBLE_HOME" current_dir="$PWD"
if [ "$VERBOSITY" = "-q" ] ; then
gen_egg_info 2>1 1> /dev/null
else
gen_egg_info
fi
popd
else else
if [ "$VERBOSITY" = "-q" ] ; then current_dir="$ANSIBLE_HOME"
gen_egg_info 2>1 1> /dev/null fi
else cd "$ANSIBLE_HOME"
gen_egg_info if [ "$VERBOSITY" = "-q" ] ; then
fi gen_egg_info 2>1 1> /dev/null
else
gen_egg_info
fi fi
cd "$current_dir"
#
# Print out values unless -q is set # Print out values unless -q is set
#
if [ "$VERBOSITY" != "-q" ] ; then if [ "$VERBOSITY" != "-q" ] ; then
echo "" echo ""

@ -36,31 +36,28 @@ expr "$MANPATH" : "${PREFIX_MANPATH}.*" > /dev/null || export MANPATH="$PREFIX_M
gen_egg_info() gen_egg_info()
{ {
python setup.py egg_info python setup.py egg_info
if [ -e $PREFIX_PYTHONPATH/ansible*.egg-info ] ; then if [ -e "$PREFIX_PYTHONPATH/ansible*.egg-info" ] ; then
rm -r $PREFIX_PYTHONPATH/ansible*.egg-info rm -r "$PREFIX_PYTHONPATH/ansible*.egg-info"
fi 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 if [ "$ANSIBLE_HOME" != "$PWD" ] ; then
# directory in history current_dir="$PWD"
#if [ "$ANSIBLE_HOME" != "$PWD" ] ; then else
# pushd "$ANSIBLE_HOME" current_dir="$ANSIBLE_HOME"
# if [ "$VERBOSITY" = "-q" ] ; then fi
# gen_egg_info 2>1 1> /dev/null cd "$ANSIBLE_HOME"
# else #if [ "$VERBOSITY" = "-q" ] ; then
# gen_egg_info # gen_egg_info 2>1 1> /dev/null
# fi
# popd
#else #else
# if [ "$VERBOSITY" = "-q" ] ; then # gen_egg_info
# gen_egg_info 2>1 1> /dev/null
# else
# gen_egg_info
# fi
#fi #fi
cd "$current_dir"
#
# Print out values unless -q is set # Print out values unless -q is set
#
if [ "$VERBOSITY" != "-q" ] ; then if [ "$VERBOSITY" != "-q" ] ; then
echo "" echo ""

Loading…
Cancel
Save