[更新] 修复权限不足导致的无法正常启动言灵的问题, 修复zsh配置文件未按照预期移动的问题

This commit is contained in:
xunmi-pc 2024-02-20 18:44:34 +08:00
parent 560cc4c762
commit cf25cf75bb

View File

@ -103,8 +103,7 @@ Download_Config() {
config_url=${ROOT_URL}raw/配置/zshrc
sudo wget -t 3 -q --show-progress -c "${config_url}" || Show 1 "无法下载预设配置( ${config_url} )"
sudo sed -i "s:export ZSH=/etc/oh-my-zsh:export ZSH=$ohmyzsh_dir:" zshrc
sudo echo "export 寻觅=${ROOT_INSTALL}" | cat - zshrc > .zshrc
sudo mv .zshrc /etc/skel/.zshrc
sudo mv zshrc /etc/skel/.zshrc
cp -v /etc/skel/.zshrc $HOME
cd $HOME
ColorReset
@ -130,6 +129,7 @@ Install_Zsh
[[ "$@" == *-c* ]] || Download_Config
# 如果携带 -x 则不下载安装言灵
[[ "$@" == *-x* ]] || Download_X
sudo chown -R $USER:$USER $x_dir
(( $X_START == 1 )) && zsh $x_dir/安装.zsh
exec zsh
# 写入配置文件