-
-
Save dkavraal/b12ce1ba033d38932364041f1afaf70b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function pips() { ⏎ | |
for pkg in $@; do | |
pip install "$pkg" && { | |
name="$(pip show "$pkg" | grep Name: | awk '{print $2}')"; | |
version="$(pip show "$pkg" | grep Version: | awk '{print $2}')"; | |
echo "${name}==${version}" | tee -a requirements.txt; | |
} | |
done | |
} | |
# https://stackoverflow.com/a/41598648/1463812 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment