diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2016-10-29 13:30:18 +0000 |
---|---|---|
committer | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2016-10-29 13:30:18 +0000 |
commit | 16f3bbb7543d216a674fdad831dd9509772ecd97 (patch) | |
tree | 54cfb9b31a34a226d590acb7ec3f871cc22d34c9 | |
parent | 27daacc99d5072dbaeb45aed7f8315713e74f391 (diff) | |
download | ybd-16f3bbb7543d216a674fdad831dd9509772ecd97.tar.gz |
Trap error on any of the pip install commands
-rwxr-xr-x | install_dependencies.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/install_dependencies.sh b/install_dependencies.sh index 8173264..0cdc76c 100755 --- a/install_dependencies.sh +++ b/install_dependencies.sh @@ -86,6 +86,22 @@ if [ $? -ne 0 ]; then $SUDO rm get-pip.py fi -$SUDO pip install fs pyyaml sandboxlib requests -$SUDO pip install jsonschema bottle cherrypy riemann-client -$SUDO pip install pep8 +pythonmodules=( +"pep8" +"fs" +"pyyaml" +"sandboxlib" +"requests" +"jsonschema" +"bottle" +"cherrypy" +"riemann-client") + +for module in "${pythonmodules[@]}"; +do + $SUDO pip install $module + if [ $? -ne 0 ]; then + echo "Pip install failed for" $module + exit 1 + fi +done |