Created
May 10, 2013 18:40
-
-
Save camilonova/5556473 to your computer and use it in GitHub Desktop.
Update requirements if they have changed
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 | |
# This script will update the requirements only if the file has changed | |
# Author: AxiaCore S.A.S. http://axiacore.com | |
FILE=.requirements_timestamp | |
if [ ! -f $FILE ] || [ ! `stat --format="%Y" requirements.txt` -eq $(cat $FILE) ]; | |
then | |
echo "Updating requirements..." | |
pip install -U -r requirements.txt | |
stat --format="%Y" requirements.txt > $FILE | |
echo "Done" | |
else | |
echo "Requirements not changed." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment