加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
autostart.sh 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
vivy89 提交于 2022-04-26 01:37 . refactor: autostart
#!/bin/bash
soft_list=soft_list.ini
# ***********************************************************************
software_config(){
ln -sf /usr/bin/nvim /usr/bin/vi
}
# ***********************************************************************
software_install(){
pacman -Sy --noconfirm
local line=
cat $soft_list |while read -r line
do
if echo "$line" |grep \;;then
continue
fi
if pacman -S --noconfirm "$line";then
echo "install $line"
else
echo "failed install $line"
fi
done
}
# ***********************************************************************
pip_npm_install(){
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install pynvim
npm config set registry https://registry.npm.taobao.org
npm install -g bash-language-server
npm install -g vscode-langservers-extracted
if npm install -g neovim ;then
echo "pip_npm_install ok"
else
echo "pip_npm_install failed"
fi
}
# ***********************************************************************
system_config(){
echo performance > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
}
# ***********************************************************************
main(){
system_config
software_install
pip_npm_install
software_config
}
main
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化