修复安装脚本

This commit is contained in:
lsy 2024-09-23 13:48:20 +08:00
parent e28a0643d0
commit af9cc15020

View File

@ -9,10 +9,10 @@ fi
mkdir -p "$path" mkdir -p "$path"
rm -rf "$path/linuxtoo" rm -rf "$path/linuxtoo"
wget https://g.lsy22.com/lsy/LinuxTool/archive/master.tar.gz -O "${path}/aa" &> /dev/null wget https://g.lsy22.com/lsy/LinuxTool/archive/master.tar.gz -O "${path}/aa" &> /dev/null || echo "脚本下载失败" && exit
tar -zxf "$path/aa" -C $path tar -zxf "$path/aa" -C $path &> /dev/null || echo "脚本解压" && exit
rm "$path/aa" rm "$path/aa"
chmod +x "$path/linuxtool/Run.sh" chmod +x "$path/linuxtool/Run.sh" &> /dev/null || echo "脚本添加执行权限失败" && exit
sed -i '/alias tool.*/d' "${HOME}/.bashrc" sed -i '/alias tool.*/d' "${HOME}/.bashrc"
echo "alias tool='$path/linuxtool/Run.sh'" | cat >> "${HOME}/.bashrc" echo "alias tool='$path/linuxtool/Run.sh'" | cat >> "${HOME}/.bashrc"