更新 bin/ZeroWrt
Signed-off-by: zhao <zhao@noreply.localhost>
This commit is contained in:
parent
83d9775be6
commit
de4e951fdb
55
bin/ZeroWrt
55
bin/ZeroWrt
@ -45,7 +45,7 @@ show_menu() {
|
|||||||
color_output "\e[36m┃\e[0m 3. 切换默认主题 \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 3. 切换默认主题 \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 4. 恢复出厂设置 \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 4. 恢复出厂设置 \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 5. 一键换源 \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 5. 一键换源 \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 6. 安装 ShellClash \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 6. 一键部署 \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 7. 检测更新 \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 7. 检测更新 \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃\e[0m 0. 退出 \e[36m┃\e[0m"
|
color_output "\e[36m┃\e[0m 0. 退出 \e[36m┃\e[0m"
|
||||||
color_output "\e[36m┃ ┃\e[0m"
|
color_output "\e[36m┃ ┃\e[0m"
|
||||||
@ -57,7 +57,7 @@ show_menu() {
|
|||||||
3) change_theme ;;
|
3) change_theme ;;
|
||||||
4) reset_config ;;
|
4) reset_config ;;
|
||||||
5) change_source ;;
|
5) change_source ;;
|
||||||
6) install_shellclash ;;
|
6) install_apps ;;
|
||||||
7) check_update ;;
|
7) check_update ;;
|
||||||
0) exit 0 ;;
|
0) exit 0 ;;
|
||||||
*) echo "无效选项,请重新输入"; show_menu ;;
|
*) echo "无效选项,请重新输入"; show_menu ;;
|
||||||
@ -155,8 +155,23 @@ EOF
|
|||||||
show_menu
|
show_menu
|
||||||
}
|
}
|
||||||
|
|
||||||
# 6. 安装 ShellClash
|
# 6. 一键部署
|
||||||
install_shellclash() {
|
install_apps() {
|
||||||
|
while true; do
|
||||||
|
clear
|
||||||
|
color_output "\e[34m[一键部署]\e[0m"
|
||||||
|
color_output "\e[36m┏━━━━━━━━━━━━━━━ 部署选项 ━━━━━━━━━━━━━━━┓\e[0m"
|
||||||
|
color_output "\e[36m┃ ┃\e[0m"
|
||||||
|
color_output "\e[36m┃\e[0m 1. 安装 ShellClash \e[36m┃\e[0m"
|
||||||
|
color_output "\e[36m┃\e[0m 2. 安装小雅 Alist \e[36m┃\e[0m"
|
||||||
|
color_output "\e[36m┃\e[0m 0. 返回主菜单 \e[36m┃\e[0m"
|
||||||
|
color_output "\e[36m┃ ┃\e[0m"
|
||||||
|
color_output "\e[36m┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\e[0m"
|
||||||
|
|
||||||
|
read -p "$(color_output "\e[33m请输入您的选择 [0-2]: \e[0m")" app_choice
|
||||||
|
|
||||||
|
case "$app_choice" in
|
||||||
|
1)
|
||||||
color_output "\e[34m[安装 ShellClash]\e[0m"
|
color_output "\e[34m[安装 ShellClash]\e[0m"
|
||||||
color_output "\e[36m请选择 ShellClash 的安装源:\e[0m"
|
color_output "\e[36m请选择 ShellClash 的安装源:\e[0m"
|
||||||
color_output "1. GitHub 源"
|
color_output "1. GitHub 源"
|
||||||
@ -167,14 +182,40 @@ install_shellclash() {
|
|||||||
case "$install_choice" in
|
case "$install_choice" in
|
||||||
1) export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' ;;
|
1) export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' ;;
|
||||||
2) export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' ;;
|
2) export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' ;;
|
||||||
0) show_menu ; return ;;
|
0) continue ;;
|
||||||
*) color_output "\e[31m无效选项,返回菜单。\e[0m" ; show_menu ; return ;;
|
*)
|
||||||
|
color_output "\e[31m无效选项\e[0m"
|
||||||
|
sleep 2
|
||||||
|
continue
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ "$install_choice" != "0" ]; then
|
||||||
sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
color_output "\e[32mShellClash 已成功安装。\e[0m"
|
color_output "\e[32mShellClash 已成功安装。\e[0m"
|
||||||
read -p "按 Enter 键返回菜单..."
|
read -p "按 Enter 键继续..."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
2)
|
||||||
|
color_output "\e[34m[安装小雅 Alist]\e[0m"
|
||||||
|
color_output "\e[33m正在安装小雅 Alist...\e[0m"
|
||||||
|
bash -c "$(curl --insecure -fsSL https://ddsrem.com/xiaoya_install.sh)"
|
||||||
|
color_output "\e[32m小雅 Alist 安装完成。\e[0m"
|
||||||
|
read -p "按 Enter 键继续..."
|
||||||
|
;;
|
||||||
|
|
||||||
|
0)
|
||||||
show_menu
|
show_menu
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
color_output "\e[31m无效选项,请重新选择\e[0m"
|
||||||
|
sleep 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# 7. 检测更新
|
# 7. 检测更新
|
||||||
|
Loading…
Reference in New Issue
Block a user