Skip to content

Instantly share code, notes, and snippets.

@dashdanw
Created February 15, 2020 04:30
Show Gist options
  • Save dashdanw/6f0fdf5c3130b0b1867f76bd4cd4b693 to your computer and use it in GitHub Desktop.
Save dashdanw/6f0fdf5c3130b0b1867f76bd4cd4b693 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# updates versions in requirements.txt file
cat requirements.txt | grep -v '^\-e' | cut -d= -f1 | xargs -I {} -n1 -P1 sh -c "echo \`curl -s https://pypi.org/project/{}/ | sed -e 's/^[[:space:]]*//' | grep '{} [0-9]' | sed -e 's/ /==/g'\`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment