From 51533a62cbab733f01ec1d0dbe15f7c5bc77aa5c Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Thu, 24 Jun 2021 16:20:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20Default=5FDevice=20?= =?UTF-8?q?=E4=B8=BA=20Default=5FTARGET=5FPROFILE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/AutoBuild_DiyScript.sh | 7 +++++-- Scripts/AutoBuild_Function.sh | 11 +++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Scripts/AutoBuild_DiyScript.sh b/Scripts/AutoBuild_DiyScript.sh index 68414f8..facc526 100755 --- a/Scripts/AutoBuild_DiyScript.sh +++ b/Scripts/AutoBuild_DiyScript.sh @@ -4,9 +4,9 @@ Diy_Core() { Author=Hyy2001 - Default_Device= + Default_TARGET_PROFILE=auto Short_Firmware_Date=true - Default_LAN_IP=192.168.1.1 + Default_LAN_IP=false INCLUDE_AutoBuild_Features=true INCLUDE_DRM_I915=true @@ -19,5 +19,8 @@ Firmware-Diy() { d-team_newifi-d2) Copy CustomFiles/mac80211.sh package/kernel/mac80211/files/lib/wifi # Copy CustomFiles/system_d-team_newifi-d2 package/base-files/files/etc/config system + ;; + *) + : esac } \ No newline at end of file diff --git a/Scripts/AutoBuild_Function.sh b/Scripts/AutoBuild_Function.sh index bd87ce3..fd03755 100755 --- a/Scripts/AutoBuild_Function.sh +++ b/Scripts/AutoBuild_Function.sh @@ -36,14 +36,21 @@ GET_INFO() { x86_Test="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/CONFIG_TARGET_(.*)_DEVICE_(.*)=y/\1/')" [[ -n ${x86_Test} ]] && break x86_Test="$(egrep -o "CONFIG_TARGET.*Generic=y" .config | sed -r 's/CONFIG_TARGET_(.*)_Generic=y/\1/')" - [[ -z ${x86_Test} ]] && TIME "[ERROR] Can not obtain the TARGET_PROFILE !" && exit 1 + [[ -z ${x86_Test} ]] && TIME "[ERROR] Can not obtain the TARGET_PROFILE,please check!" && exit 1 done [[ ${x86_Test} == x86_64 ]] && { TARGET_PROFILE=x86_64 } || { TARGET_PROFILE="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/.*DEVICE_(.*)=y/\1/')" } - [[ -z ${TARGET_PROFILE} ]] && TARGET_PROFILE="${Default_Device}" + [[ -z ${TARGET_PROFILE} ]] && { + if [[ -n ${Default_TARGET_PROFILE} && ${Default_TARGET_PROFILE} != auto ]];then + TARGET_PROFILE="${Default_TARGET_PROFILE}" + else + TIME "[ERROR] Can not obtain the TARGET_PROFILE,please check!" + exit 1 + fi + } [[ ${TARGET_PROFILE} == x86_64 ]] && { [[ $(cat ${Home}/.config) =~ CONFIG_TARGET_IMAGES_GZIP=y ]] && Firmware_Type=img.gz || Firmware_Type=img }