Created
November 9, 2015 11:26
-
-
Save max-lobur/009946a0b15988f1a326 to your computer and use it in GitHub Desktop.
Utils
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/sh | |
if [ -z "$1" ]; then echo NEED PATH TO requirements.txt; exit; fi | |
while read dependency; do | |
dependency_stripped="$(echo "${dependency}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" | |
# Skip comments | |
if [[ $dependency_stripped == \#* ]]; then | |
continue | |
# Skip blank lines | |
elif [ -z "$dependency_stripped" ]; then | |
continue | |
else | |
echo "################### Installing $dependency_stripped ###################" | |
if pip install "$dependency_stripped"; then | |
echo "$dependency_stripped is installed" | |
else | |
echo "Could not install $dependency_stripped, skipping" | |
fi | |
fi | |
done < $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment