Skip to content

Instantly share code, notes, and snippets.

@seppeljordan
Created September 15, 2019 17:44
Show Gist options
  • Save seppeljordan/98445925e8bbf2963a162e49fc3f8fbb to your computer and use it in GitHub Desktop.
Save seppeljordan/98445925e8bbf2963a162e49fc3f8fbb to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
UPGRADE=0
while getopts "uh" arg; do
case $arg in
u)
UPGRADE=1
;;
h)
echo "help message"
exit
;;
esac
done
rm -rf env
python -m venv env
if [ $UPGRADE -eq 1]; then
env/bin/pip install -r requirements.txt
else
env/bin/pip install -r requirements.txt -c requirements_frozen.txt
fi
env/bin/pip freeze > requirements_frozen.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment