修复脚本版本获取失败
This commit is contained in:
parent
8af4e1f289
commit
3a3dca5d6c
|
@ -122,13 +122,14 @@ Firmware-Diy_Main() {
|
|||
AddPackage svn lean luci-app-autoupdate Hyy2001X/AutoBuild-Packages/trunk
|
||||
Copy ${CustomFiles}/Depends/profile ${base_files}/etc
|
||||
Copy ${CustomFiles}/Depends/base-files-essential ${base_files}/lib/upgrade/keep.d
|
||||
AutoUpdate_Version=$(egrep -o "V[0-9].+" ${base_files}/bin/AutoUpdate.sh | awk 'NR==1')
|
||||
AutoUpdate_Version=$(awk -F '=' '/Version/{print $2}' ${base_files}/bin/AutoUpdate.sh | awk 'NR==1')
|
||||
case "${OP_Maintainer}/${OP_REPO_NAME}" in
|
||||
coolsnowwolf/lede)
|
||||
Copy ${CustomFiles}/Depends/coremark.sh ${Home}/$(PKG_Finder d "package feeds" coremark)
|
||||
sed -i '\/etc\/firewall.user/d;/exit 0/d' ${Version_File}
|
||||
cat >> ${Version_File} <<EOF
|
||||
|
||||
sed -i '/check_signature/d' /etc/opkg.conf
|
||||
sed -i 's#mirrors.cloud.tencent.com/lede#downloads.immortalwrt.cnsztl.eu.org#g' /etc/opkg/distfeeds.conf
|
||||
sed -i 's#18.06.9/##g' /etc/opkg/distfeeds.conf
|
||||
sed -i 's#releases/#snapshots/#g' /etc/opkg/distfeeds.conf
|
||||
|
|
|
@ -298,8 +298,8 @@ function UPDATE_SCRIPT() {
|
|||
DOWNLOADER --file-name AutoUpdate.sh --no-url-name --dl ${DOWNLOADERS} --url "$2" --path /tmp --timeout 5 --type 脚本
|
||||
if [[ -s /tmp/AutoUpdate.sh ]];then
|
||||
chmod +x /tmp/AutoUpdate.sh
|
||||
Script_Version=$(egrep -o "V[0-9]+.[0-9].+" /tmp/AutoUpdate.sh | awk 'NR==1')
|
||||
Banner_Version=$(egrep -o "V[0-9]+.[0-9].+" /etc/banner)
|
||||
Script_Version=$(awk -F '=' '/Version/{print $2}' /tmp/AutoUpdate.sh | awk 'NR==1')
|
||||
Banner_Version=$(egrep -o "V[0-9.]+" /etc/banner)
|
||||
mv -f /tmp/AutoUpdate.sh $1
|
||||
ECHO "脚本保存路径: [$1]"
|
||||
[[ -n ${Banner_Version} && $1 == /bin ]] && sed -i "s?${Banner_Version}?${Script_Version}?g" /etc/banner
|
||||
|
|
Loading…
Reference in New Issue