33 lines
849 B
Bash
Executable File
33 lines
849 B
Bash
Executable File
#!/bin/sh
|
|
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
|
. "$DIR/../env.sh"
|
|
|
|
# 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
|
|
sudo mkdir -p /root/.pip
|
|
sudo cp python/pip.conf /root/.pip/pip.conf
|
|
fi
|
|
|
|
# install python3
|
|
case "$PM" in
|
|
apt)
|
|
sudo apt install python3 python3-pip python-is-python3
|
|
command -v fish 2>/dev/null && sudo pip3 install virtualfish
|
|
;;
|
|
pacman)
|
|
sudo pacman -S --needed python python-pip
|
|
command -v fish 2>/dev/null && sudo pip install virtualfish
|
|
;;
|
|
esac
|
|
|
|
# enable auto_activation plugin for virtualfish
|
|
command -v fish 2>/dev/null && fish -c "yes | vf install && vf addplugins auto_activation"
|
|
|
|
|