From b5edaed2b7fae6efc71afe9ac36a460518562170 Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Sun, 6 Jun 2021 14:05:58 +0800 Subject: [PATCH] =?UTF-8?q?V6.0=20=E9=87=8D=E5=86=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 常规更新: bash /bin/AutoUpdate.sh 常规更新(镜像): bash /bin/AutoUpdate.sh -P 常规更新(固件保存到 /mnt/sda1): bash /bin/AutoUpdate.sh path=/mnt/sda1 (-P) 更换 Github 地址: bash /bin/AutoUpdate.sh -C https://github.com/Hyy2001X/AutoBuild-Actions 更换新固件引导(x86_64): bash /bin/AutoUpdate.sh -B UEFI 设置定时任务: bash /bin/AutoUpdate.sh task="-u" "0 5 * * *" 更新脚本: bash /bin/AutoUpdate.sh -x 更新脚本(镜像): bash /bin/AutoUpdate.sh -x -P 更新脚本(指定到保存位置): bash /bin/AutoUpdate.sh -x path=/mnt/sda1 更新脚本(指定 URL): bash /bin/AutoUpdate.sh -x url=https://raw.githubusercontent.com/Hyy2001X/AutoBuild-Actions/master/Scripts/AutoUpdate.sh 更新脚本(both): bash /bin/AutoUpdate.sh -x url=https://raw.githubusercontent.com/Hyy2001X/AutoBuild-Actions/master/Scripts/AutoUpdate.sh path=/mnt/sda1 --- Scripts/AutoUpdate.sh | 841 +++++++++++++++++++++++------------------- 1 file changed, 468 insertions(+), 373 deletions(-) diff --git a/Scripts/AutoUpdate.sh b/Scripts/AutoUpdate.sh index 76c72e8..4e9f512 100755 --- a/Scripts/AutoUpdate.sh +++ b/Scripts/AutoUpdate.sh @@ -1,427 +1,522 @@ #!/bin/bash -# https://github.com/Hyy2001X/AutoBuild-Actions -# AutoBuild Module by Hyy2001 +# AutoBuild Module by Hyy2001 # AutoUpdate for Openwrt +# Depends on bash wget curl x86:gzip -Version=V5.7.6 +TITLE() { + clear && echo "Openwrt-AutoUpdate Script by Hyy2001 ${Version}" +} -Shell_Helper() { -cat <...] [-c] [-b] <额外参数> - $0 [<其他>...] [-x] [-xp] [-l] [-lp] [-d] [-h] - $0 [<更新参数>...] [<测试模式>...] +使用方法: $0 [none] [] [-P] [-n] [-f] [-u] + $0 [<更新脚本>] [-x/-x /-x ] -更新参数: +更新固件: + [none] 更新固件 [保留配置] -n 更新固件 [不保留配置] - -np 更新固件 [不保留配置] (强制镜像加速) -f 强制更新固件,即跳过版本号验证,自动下载以及安装必要软件包 [保留配置] -u 适用于定时更新 LUCI 的参数 [保留配置] + -? 更新固件 (保存固件到用户提供的目录) 设置参数: - -c [额外参数:] 更换 Github 地址 - -b [额外参数:<引导方式 UEFI/Legacy>] 指定 x86 设备下载使用 UEFI/Legacy 引导的固件 (危险) + -C 更换 Github 地址 + -B 指定 x86_64 设备下载 UEFI 或 Legacy 的固件 (危险) + --corn