Fix weird bash code issue which made bash complain about "then"

This commit is contained in:
Pedro Algarvio
2014-08-13 00:55:04 +01:00
parent fa04d6f9df
commit 2662b5807c

View File

@@ -110,19 +110,19 @@ esac
if [[ "$shell" != "fish" ]]; then if [[ "$shell" != "fish" ]]; then
cat <<EOS cat <<EOS
if [ -n "\$PYENV_ACTIVATE" ]; then if [ -n "\$PYENV_ACTIVATE" ]; then
if [ "x\`pyenv version-name\`" = "xsystem" ]; then if [ "\$(pyenv version-name)" = "system" ]; then
pyenv deactivate --no-error --verbose pyenv deactivate --no-error --verbose
return 0 return 0
fi fi
if [ "x\$PYENV_ACTIVATE" != "x\`pyenv prefix\`" ]; then if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix)" ]; then
if pyenv deactivate --no-error --verbose; then if [ pyenv deactivate --no-error --verbose ]; then
pyenv activate --no-error --verbose || unset PYENV_DEACTIVATE pyenv activate --no-error --verbose || unset PYENV_DEACTIVATE
else else
pyenv activate --no-error --verbose pyenv activate --no-error --verbose
fi fi
fi fi
else else
if [ -z "\$VIRTUAL_ENV" ] && [ "x\$PYENV_DEACTIVATE" != "x\`pyenv prefix\`" ]; then if [ -z "\$VIRTUAL_ENV" ] && [ "\$PYENV_DEACTIVATE" != "\$(pyenv prefix)" ]; then
pyenv activate --no-error --verbose pyenv activate --no-error --verbose
fi fi
fi fi