Last active
July 9, 2016 09:44
-
-
Save playpauseandstop/b8517a69d3558f3bce4d2851d2bc4a50 to your computer and use it in GitHub Desktop.
Tiny wrapper around pip-check cmd, to run it inside venv Python first
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Tiny shell script to run ``pip-check`` cmd inside of venv or fallback to | |
# global ``pip-check`` after. | |
# | |
# `pip-check <https://github.com/bartTC/pip-check/>`_ is a tool for checking | |
# outdated versions installed in your Python virtual environment or global | |
# site packages. | |
# | |
# Usage | |
# ===== | |
# | |
# :: | |
# | |
# $ cd /path/to/project-with-env | |
# $ env-pip-check # will run env/bin/pip-check | |
# $ cd /path/to/project-with-tox | |
# $ env-pip-check # will run each available .tox/<toxenv>/bin/pip-check | |
# $ cd /path/to/all/projects | |
# $ env-pip-check # will run pip-check | |
# | |
found=`find . \( -d 3 -a -path *bin/pip-check -o -d 4 -a -path *tox/*/bin/pip-check \)` | |
for pip_check in $found; do | |
echo "$ ${pip_check}" | |
$pip_check | |
done | |
if [ -z "$found" ]; then | |
echo "Fallback to global pip-check" | |
pip-check | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment