1 Star 0 Fork 0

王正礼/Click_in

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
install.sh 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
王正礼 提交于 2021-11-25 12:18 . 优化启动项
#!/usr/bin/env bash
#安装python调用相关的库文件
function update(){
sudo apt-get update
sudo apt-get upgrade -y
#pip升级更新
pip install --upgrade pip
#安装脚本调用库
pip install configparser
pip install selenium
pip install datetime
pip install chinese_calendar
return 0
}
#将谷歌浏览器驱动复制到/usr/bin目录下
function mv_chromedriver(){
cd "$dirPath"/config || exit
sudo cp chromedriver /usr/bin
return 0
}
#安装google浏览器
function chrome_install(){
#卸载原有的谷歌浏览器
dpkg --list | grep 'google-chrome-stable' \
&& sudo dpkg --purge google-chrome-stable
cd "$dirPath"/config || exit
sudo dpkg -i google-chrome-stable_current_amd64.deb
return 0
}
#清除多余的配置文件
function purge_file() {
cd "$dirPath"/config || exit
if cat ERPcookies.pickle;then
rm -rf ERPcookies.pickle
fi
if cat userInfo.pickle;then
rm -rf userInfo.pickle
fi
}
function main(){
dirPath=$( pwd )
update
mv_chromedriver
chrome_install
purge_file
/usr/bin/python3 "$dirPath"/main.py
exit 0
}
main
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang-zhengli5/click_in.git
git@gitee.com:wang-zhengli5/click_in.git
wang-zhengli5
click_in
Click_in
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385