更新readme,卸载脚本关闭当前命令的别名
This commit is contained in:
parent
2ae7fcbfdb
commit
5ea3f46ba3
@ -73,7 +73,7 @@ update_alias() {
|
|||||||
|
|
||||||
shopt -s expand_aliases
|
shopt -s expand_aliases
|
||||||
alias tool="$path/linuxtool/run.sh"
|
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
|
for file in "${HOME}/.bashrc" "${HOME}/.profile" "${HOME}/.zshrc" "/etc/profile"; do
|
||||||
update_alias "$file"
|
update_alias "$file"
|
||||||
|
@ -15,6 +15,9 @@ for file in "${HOME}/.bashrc" "${HOME}/.profile" "${HOME}/.zshrc" "/etc/profile"
|
|||||||
remove_alias "$file"
|
remove_alias "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
shopt -u expand_aliases
|
||||||
|
|
||||||
|
unalias tool &> /dev/null
|
||||||
|
|
||||||
|
|
||||||
echo "脚本已完整卸载,公众号 lsy22 可获取一键安装脚本"
|
echo "脚本已完整卸载,公众号 lsy22 可获取一键安装脚本"
|
||||||
|
12
README.md
12
README.md
@ -53,10 +53,20 @@
|
|||||||
## 💻 安装方法
|
## 💻 安装方法
|
||||||
|
|
||||||
### 快速安装
|
### 快速安装
|
||||||
|
> GitHub 源
|
||||||
```bash
|
```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. 运行安装脚本
|
1. 运行安装脚本
|
||||||
2. 选择安装位置(默认 /var/script)
|
2. 选择安装位置(默认 /var/script)
|
||||||
|
Loading…
Reference in New Issue
Block a user