Created
April 7, 2017 07:38
-
-
Save cuonggt/a7e5c290ab39e81d7e439e8ff2600b36 to your computer and use it in GitHub Desktop.
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
pip_install_save() { | |
package_name=$1 | |
requirements_file=$2 | |
if [[ -z $requirements_file ]] | |
then | |
requirements_file='./requirements.txt' | |
fi | |
pip install $package_name && pip freeze | grep -i $package_name >> $requirements_file | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment