Display messages only on verbose mode

This commit is contained in:
Yamashita Yuu
2014-01-18 18:00:59 +09:00
parent 88c9633415
commit dc7b6abfde

View File

@@ -131,7 +131,9 @@ venv() {
install_setuptools() { install_setuptools() {
local version="$1" local version="$1"
{ if [ "${EZ_SETUP+defined}" ] && [ -f "${EZ_SETUP}" ]; then { if [ "${EZ_SETUP+defined}" ] && [ -f "${EZ_SETUP}" ]; then
echo "Installing setuptools from ${EZ_SETUP}..." 1>&2 if [ -n "$VERBOSE" ]; then
echo "Installing setuptools from ${EZ_SETUP}..." 1>&2
fi
cat "${EZ_SETUP}" cat "${EZ_SETUP}"
else else
[ -n "${EZ_SETUP_URL}" ] || { [ -n "${EZ_SETUP_URL}" ] || {
@@ -141,7 +143,9 @@ install_setuptools() {
EZ_SETUP_URL="https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py" EZ_SETUP_URL="https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py"
fi fi
} }
echo "Installing setuptools from ${EZ_SETUP_URL}..." 1>&2 if [ -n "$VERBOSE" ]; then
echo "Installing setuptools from ${EZ_SETUP_URL}..." 1>&2
fi
http get "${EZ_SETUP_URL}" http get "${EZ_SETUP_URL}"
fi fi
} | PYENV_VERSION="${version}" pyenv-exec python } | PYENV_VERSION="${version}" pyenv-exec python
@@ -150,7 +154,9 @@ install_setuptools() {
install_pip() { install_pip() {
local version="$1" local version="$1"
{ if [ "${GET_PIP+defined}" ] && [ -f "${GET_PIP}" ]; then { if [ "${GET_PIP+defined}" ] && [ -f "${GET_PIP}" ]; then
echo "Installing pip from ${GET_PIP}..." 1>&2 if [ -n "$VERBOSE" ]; then
echo "Installing pip from ${GET_PIP}..." 1>&2
fi
cat "${GET_PIP}" cat "${GET_PIP}"
else else
[ -n "${GET_PIP_URL}" ] || { [ -n "${GET_PIP_URL}" ] || {
@@ -160,7 +166,9 @@ install_pip() {
GET_PIP_URL="https://raw.github.com/pypa/pip/master/contrib/get-pip.py" GET_PIP_URL="https://raw.github.com/pypa/pip/master/contrib/get-pip.py"
fi fi
} }
echo "Installing pip from ${GET_PIP_URL}..." 1>&2 if [ -n "$VERBOSE" ]; then
echo "Installing pip from ${GET_PIP_URL}..." 1>&2
fi
http get "${GET_PIP_URL}" http get "${GET_PIP_URL}"
fi fi
} | PYENV_VERSION="${version}" pyenv-exec python } | PYENV_VERSION="${version}" pyenv-exec python