V6.8.4 修复 UCI Github 地址修改失效
This commit is contained in:
parent
6517c0814f
commit
4ec9938137
|
@ -3,7 +3,7 @@
|
||||||
# AutoUpdate for Openwrt
|
# AutoUpdate for Openwrt
|
||||||
# Dependences: wget-ssl/wget/uclient-fetch curl jq expr sysupgrade
|
# Dependences: wget-ssl/wget/uclient-fetch curl jq expr sysupgrade
|
||||||
|
|
||||||
Version=V6.8.3
|
Version=V6.8.4
|
||||||
|
|
||||||
function TITLE() {
|
function TITLE() {
|
||||||
clear && echo "Openwrt-AutoUpdate Script by Hyy2001 ${Version}"
|
clear && echo "Openwrt-AutoUpdate Script by Hyy2001 ${Version}"
|
||||||
|
@ -341,16 +341,18 @@ function LOAD_VARIABLE() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function CHANGE_GITHUB() {
|
function CHANGE_GITHUB() {
|
||||||
if [[ ! $1 =~ https://github.com/ ]]
|
if [[ ! $1 =~ https://github.com/ || $# != 1 ]]
|
||||||
then
|
then
|
||||||
ECHO r "Github 地址格式错误,正确地址示例: https://github.com/Hyy2001X/AutoBuild-Actions"
|
ECHO r "Github 地址格式错误,正确地址示例: https://github.com/Hyy2001X/AutoBuild-Actions"
|
||||||
EXIT 1
|
EXIT 1
|
||||||
fi
|
fi
|
||||||
UCI_Github="$(uci get autoupdate.@common[0].github 2> /dev/null)"
|
UCI_Github="$(uci get autoupdate.@autoupdate[0].github 2> /dev/null)"
|
||||||
[[ ${UCI_Github} && ! ${UCI_Github} == $1 ]] && {
|
if [[ ${UCI_Github} && ! ${UCI_Github} == $1 ]]
|
||||||
uci set autoupdate.@common[0].github="$1" 2> /dev/null
|
then
|
||||||
|
uci set autoupdate.@autoupdate[0].github="$1" 2> /dev/null
|
||||||
|
uci commit autoupdate
|
||||||
LOGGER "UCI 地址已修改为 [$1]"
|
LOGGER "UCI 地址已修改为 [$1]"
|
||||||
}
|
fi
|
||||||
if [[ ! ${Github} == $1 ]]
|
if [[ ! ${Github} == $1 ]]
|
||||||
then
|
then
|
||||||
EDIT_VARIABLE edit ${Custom_Variable} Github $1
|
EDIT_VARIABLE edit ${Custom_Variable} Github $1
|
||||||
|
|
Loading…
Reference in New Issue