代码拉取完成,页面将自动刷新
#!/bin/bash
if [[ ! -f ~/.gitconfig ]];then
read -p "input your name for git config > "
name=$REPLY
read -p "input your mail for git config > "
mail=$REPLY
echo "name is $name"
echo "mail is $mail"
fi
function installDependents()
{
for b in $@; do
if [[ -z `which $b` ]];then
sudo apt install -y $b
if [[ $? != 0 ]];then
sudo apt update
sudo apt install -y $b
fi
fi
if [[ -z `which $b` ]];then
echo $b had not install
exit
fi
done
}
# first should install wget and python
installDependents wget python
wget https://tuna.moe/oh-my-tuna/oh-my-tuna.py -O oh-my-tuna.py
sudo python oh-my-tuna.py --global
if [[ $installFish == 1 ]];then
sudo apt-add-repository ppa:fish-shell/release-3
fi
sudo apt update
sudo apt install -y git cmake make gcc g++ gdb vim htop
sudo apt install -y lrzsz tig screen ccache dos2unix unzip zlib1g-dev
sudo apt install -y openssl openssh-client openssh-server libssl-dev
sudo apt install -y curl libcurl4-openssl-dev python-dev
sudo apt install -y automake libmad0-dev libmad0 p7zip-full libgles2-mesa-dev
# python and pip
wget https://bootstrap.pypa.io/get-pip.py -O get-pip.py && sudo python get-pip.py
sudo pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
sudo pip install -U colorama pip lxml requests beautifulsoup4 pymongo psutil
if [[ ! -f ~/.gitconfig ]];then
git config --global user.name $name
git config --global user.email $mail
fi
if [[ ! -f ~/.ssh/id_rsa.pub ]];then
ssh-keygen -t rsa -C $mail -b 4096 && cat ~/.ssh/id_rsa.pub
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。