Merge pull request #40 from s0undt3ch/master

Fix weird bash code issue which made bash complain about "then"
This commit is contained in:
Yamashita, Yuu
2014-08-14 10:03:35 +09:00
2 changed files with 9 additions and 9 deletions

View File

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

View File

@@ -32,11 +32,11 @@ load test_helper
export PYENV_VIRTUALENV_INIT=1;
_pyenv_virtualenv_hook() {
if [ -n "\$PYENV_ACTIVATE" ]; then
if [ "x\`pyenv version-name\`" = "xsystem" ]; then
if [ "\$(pyenv version-name)" = "system" ]; then
pyenv deactivate --no-error --verbose
return 0
fi
if [ "x\$PYENV_ACTIVATE" != "x\`pyenv prefix\`" ]; then
if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix)" ]; then
if pyenv deactivate --no-error --verbose; then
pyenv activate --no-error --verbose || unset PYENV_DEACTIVATE
else
@@ -44,7 +44,7 @@ _pyenv_virtualenv_hook() {
fi
fi
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
fi
fi
@@ -89,11 +89,11 @@ EOS
export PYENV_VIRTUALENV_INIT=1;
_pyenv_virtualenv_hook() {
if [ -n "\$PYENV_ACTIVATE" ]; then
if [ "x\`pyenv version-name\`" = "xsystem" ]; then
if [ "\$(pyenv version-name)" = "system" ]; then
pyenv deactivate --no-error --verbose
return 0
fi
if [ "x\$PYENV_ACTIVATE" != "x\`pyenv prefix\`" ]; then
if [ "\$PYENV_ACTIVATE" != "\$(pyenv prefix)" ]; then
if pyenv deactivate --no-error --verbose; then
pyenv activate --no-error --verbose || unset PYENV_DEACTIVATE
else
@@ -101,7 +101,7 @@ _pyenv_virtualenv_hook() {
fi
fi
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
fi
fi