Fix pip detection

This commit is contained in:
Cyryl Płotnicki 2016-11-03 20:55:20 +01:00
parent 70017cf7b7
commit 9bae034719

View file

@ -170,16 +170,21 @@ $SUDO npm install -g reveal-md
echo "Installing fancy differ" echo "Installing fancy differ"
$SUDO npm install -g diff-so-fancy $SUDO npm install -g diff-so-fancy
pip3_path=`which pip3` if [[ -z $NOPYTHON3 ]]; then
if [[ -z $NOPYTHON3 && -x pip3_path ]]; then pip3_path=`which pip3`
PIP=pip3 echo "pip3 path is $pip3_path"
else if [[ -x pip3_path ]]; then
PIP=pip echo "Choosing pip3 for pip"
PIP=pip3
else
echo "Choosing pip"
PIP=pip
fi
echo "Installing Nikola"
$SUDO $PIP install pygments-style-solarized ws4py watchdog webassets Nikola
fi
fi fi
echo "Installing Nikola"
$SUDO $PIP install pygments-style-solarized ws4py watchdog webassets Nikola
if [[ -z $USER ]]; then if [[ -z $USER ]]; then
USER=`whoami` USER=`whoami`
fi fi