From 8cf5a83b3324188173f38fafe72e223e68ae2c5d Mon Sep 17 00:00:00 2001 From: BigfootACA Date: Tue, 27 Jul 2021 00:10:01 +0800 Subject: [PATCH] one definitions file per device Signed-off-by: BigfootACA --- extract.ps1 | 10 ++-------- extract.sh | 10 ++-------- extract_mac.sh | 11 +++-------- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/extract.ps1 b/extract.ps1 index 1495057..6d4824e 100644 --- a/extract.ps1 +++ b/extract.ps1 @@ -6,14 +6,8 @@ $Config=Join-Path ` -Path $Configs ` -ChildPath (-Join ($CodeName,".txt")) If( -Not (Test-Path -Path $Config)){ - Write-Output "warning: your model has no definition file, use default" - $Config=Join-Path ` - -Path $Configs ` - -ChildPath (-Join ($DefConfig,".txt")) - if( -Not (Test-Path -Path $Config)){ - Write-Output "default definition file not found" - exit 1 - } + Write-Output "ERROR: your model has no definition file, please check" + exit 1 } If(Test-Path -Path output){ Remove-Item ` diff --git a/extract.sh b/extract.sh index d1fe03e..14c2524 100755 --- a/extract.sh +++ b/extract.sh @@ -8,17 +8,11 @@ then fi cd "$(dirname "$0")" CONFIGS=definitions -DEF=sdm845-generic CONFIG="${CONFIGS}/${1}.txt" if ! [ -f "${CONFIG}" ] then - echo "warning: your model has no definition file, use default" >&2 - CONFIG="${CONFIGS}/${DEF}.txt" - if ! [ -f "${CONFIG}" ] - then - echo "default definition file not found" - exit 1 - fi + echo "ERROR: your model has no definition file, please check!" >&2 + exit 1 fi rm -rf ./output echo "copying drivers..." diff --git a/extract_mac.sh b/extract_mac.sh index 548f155..5c8ce7f 100644 --- a/extract_mac.sh +++ b/extract_mac.sh @@ -8,18 +8,13 @@ then fi cd "$(dirname "$0")" CONFIGS=definitions -DEF=sdm845-generic CONFIG="${CONFIGS}/${1}.txt" if ! [ -f "${CONFIG}" ] then - echo "warning: your model has no definition file, use default" >&2 - CONFIG="${CONFIGS}/${DEF}.txt" - if ! [ -f "${CONFIG}" ] - then - echo "default definition file not found" - exit 1 - fi + echo "ERROR: your model has no definition file, please check!" >&2 + exit 1 fi +rm -rf ./output echo "copying drivers..." while read -r line do