更新readme,卸载脚本关闭当前命令的别名

This commit is contained in:
lsy 2024-11-22 20:44:06 +08:00
parent 2ae7fcbfdb
commit 5ea3f46ba3
3 changed files with 15 additions and 2 deletions

View File

@ -73,7 +73,7 @@ update_alias() {
shopt -s expand_aliases
alias tool="$path/linuxtool/run.sh"
export -f tool 2>/dev/null || true
export -f tool &> /dev/null
for file in "${HOME}/.bashrc" "${HOME}/.profile" "${HOME}/.zshrc" "/etc/profile"; do
update_alias "$file"

View File

@ -15,6 +15,9 @@ for file in "${HOME}/.bashrc" "${HOME}/.profile" "${HOME}/.zshrc" "/etc/profile"
remove_alias "$file"
done
shopt -u expand_aliases
unalias tool &> /dev/null
echo "脚本已完整卸载,公众号 lsy22 可获取一键安装脚本"

View File

@ -53,10 +53,20 @@
## 💻 安装方法
### 快速安装
> GitHub 源
```bash
wget -O install.sh https://raw.githubusercontent.com/lsy2246/linuxtool/main/install.sh && bash install.sh
bash <(curl -Ls https://raw.githubusercontent.com/lsy2246/linuxtool/refs/heads/master/Config/Manage/install.sh)
```
> Gitee 源(国内推荐)
```bash
bash <(curl -Ls https://gitee.com/lsy22/linuxtool/raw/master/Config/Manage/install.sh)
```
注意:
- 请确保系统已安装 `curl` 工具
- 需要 root 权限或 sudo 权限执行
- 如遇到网络问题,建议国内用户使用 Gitee 源
### 使用说明
1. 运行安装脚本
2. 选择安装位置(默认 /var/script)