dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit c35f5df69c545bb026e35d0a45139fa22a0a7e86
parent 8b3659183dee56eca63382c47c558361d92f9053
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Sun,  5 Nov 2017 08:40:02 -0500

install pip packages for pip, pip2, and pip3

Diffstat:
Minit/30_python_pip.sh | 17++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/init/30_python_pip.sh b/init/30_python_pip.sh @@ -1,16 +1,23 @@ #!/usr/bin/env bash -[[ ! "$(type -P pip)" ]] && echo "Pip needs to be installed." && return 1 # pip packages -pips=( +pkgs=( bs4 gcalcli grepg haxor-news + neovim requests ) -for pip in "${pip[@]}"; do - pip install $pip - if [ "$pip" == "gcalcli" ]; then gcalcli list; fi +for PIP in pip pip2 pip3; do + if [[ "$(type -P $PIP)" ]]; then + echo "## Installing $PIP packages" + for pkg in "${pkgs[@]}"; do + $PIP install $pkg + [ "$pkg" == "gcalcli" ] && gcalcli list + done + else + echo "## $PIP not installed" + fi done