dotfiles/python/install.sh

31 lines
728 B
Bash
Raw Normal View History

2020-09-17 10:24:35 +00:00
#!/bin/bash
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
2020-09-18 04:16:15 +00:00
# config pip mirror for CHINA
if in-china; then
lnsf $DIR/pip.conf ~/.pip/pip.conf
if sudo [ ! -f /root/.pip/pip.conf ]; then
sudo mkdir -p /root/.pip
sudo cp $DIR/pip.conf /root/.pip/pip.conf
fi
fi
2020-09-17 10:24:35 +00:00
# install python3
case "$PM" in
apt)
sudo apt install python3 python3-pip
2020-09-17 16:02:24 +00:00
fish-is-default-shell && sudo pip3 install virtualfish
2020-09-17 10:24:35 +00:00
;;
pacman)
2020-09-18 18:01:58 +00:00
sudo pacman -S --needed python python-pip
2020-09-17 16:02:24 +00:00
fish-is-default-shell && sudo pip install virtualfish
2020-09-17 10:24:35 +00:00
;;
esac
2020-09-17 16:02:24 +00:00
# enable auto_activation plugin for virtualfish
2020-09-18 04:16:15 +00:00
fish-is-default-shell && fish -c "yes | vf install && vf addplugins auto_activation"
2020-09-17 16:02:24 +00:00