新增删除
This commit is contained in:
parent
e1d14e68cb
commit
d179f13c99
21
Config/Manage/unInstall.sh
Normal file
21
Config/Manage/unInstall.sh
Normal file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
declare path=$(cat /etc/profile | grep "tool=" | awk -F "=" '{print $2}' | tr -d "'")
|
||||
path=$(dirname $path)
|
||||
rm -rf $path
|
||||
if [[ -e "${HOME}/.bashrc" ]];then
|
||||
sed -i '/alias tool.*/d' "${HOME}/.bashrc"
|
||||
source "${HOME}/.bashrc" &> /dev/null
|
||||
fi
|
||||
|
||||
if [[ -e "${HOME}/.profile" ]];then
|
||||
sed -i '/alias tool.*/d' "${HOME}/.profile"
|
||||
source "${HOME}/.profile" &> /dev/null
|
||||
fi
|
||||
|
||||
if [[ -e "${HOME}/.zshrc" ]];then
|
||||
sed -i '/alias tool.*/d' "${HOME}/.zshrc"
|
||||
source "${HOME}/.zshrc" &> /dev/null
|
||||
fi
|
||||
|
||||
sed -i '/alias tool.*/d' "/etc/profile"
|
||||
echo "脚本已经卸载完整,公众号 lsy22 可以获取一键安装脚本"
|
Loading…
Reference in New Issue
Block a user