Make ordered_pip.sh more robust

Make ordered_pip.sh exit on error. Remove useless echo of empty
string. Fix counting of the number of packages installed. Ignore blank
lines in requirements file.
This commit is contained in:
Jonathan Kamens
2012-08-23 17:25:58 -04:00
parent 49cac9ae97
commit 0a0f35a14e
+5 -4
View File
@@ -1,11 +1,12 @@
#!/bin/bash
#!/bin/bash -e
echo $hash
a=0
while read line
do
if [[ $line != \#* ]] ; then
if [[ -n "$line" && "$line" != \#* ]] ; then
#echo $line
pip install $line
fi
((a = a + 1))
done < $1
echo "Final line count is: $a";
echo "$0: Final package count is $a";