one definitions file per device

Signed-off-by: BigfootACA <bigfoot@classfun.cn>
This commit is contained in:
BigfootACA 2021-07-27 00:10:01 +08:00
parent eb6568fb18
commit 8cf5a83b33
3 changed files with 7 additions and 24 deletions

View File

@ -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"
Write-Output "ERROR: your model has no definition file, please check"
exit 1
}
}
If(Test-Path -Path output){
Remove-Item `

View File

@ -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"
echo "ERROR: your model has no definition file, please check!" >&2
exit 1
fi
fi
rm -rf ./output
echo "copying drivers..."

View File

@ -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"
echo "ERROR: your model has no definition file, please check!" >&2
exit 1
fi
fi
rm -rf ./output
echo "copying drivers..."
while read -r line
do