be quiet while copy drivers

Signed-off-by: BigfootACA <bigfoot@classfun.cn>
This commit is contained in:
BigfootACA 2021-07-18 22:12:01 +08:00
parent 5b995ab037
commit 797776f95a
3 changed files with 19 additions and 11 deletions

View File

@ -5,7 +5,6 @@ $DefConfig="sdm845-generic"
$Config=Join-Path `
-Path $Configs `
-ChildPath (-Join ($CodeName,".txt"))
Write-Output $Config
If( -Not (Test-Path -Path $Config)){
Write-Output "warning: your model has no definition file, use default"
$Config=Join-Path `
@ -22,6 +21,7 @@ If(Test-Path -Path output){
-Force `
-Path output
}
Write-Output "copying drivers..."
$Output=New-Item `
-ItemType Directory `
-Path output
@ -29,15 +29,17 @@ Get-Content `
-Path $Config | `
Copy-Item `
-Recurse `
-Verbose `
-Path { "."+$_ } `
-Destination $Output
Write-Output "rename drivers..."
Get-ChildItem `
-Recurse `
-Path $Output `
-Filter *.inf_ | `
Rename-Item `
-NewName { `
$_.FullName `
-Replace '\.inf_','.inf' `
}
Rename-Item `
-NewName { `
$_.FullName `
-Replace '\.inf_','.inf' `
}
Write-Output "done"

View File

@ -21,12 +21,15 @@ then
fi
fi
rm -rf ./output
echo "copying drivers..."
while read -r line
do
file="${line//$'\r'/}"
file="${file//\\/\/}"
cp -vr ."${file}" output/
cp -r ."${file}" output/
done<"${CONFIG}"
echo "rename drivers..."
find output -type f -name '*.inf_'|while read -r line
do mv -v "${line}" "${line//.inf_/.inf}"
do mv "${line}" "${line//.inf_/.inf}"
done
echo "done"

View File

@ -20,12 +20,15 @@ then
exit 1
fi
fi
echo "copying drivers..."
while read -r line
do
file="${line//$'\r'/}"
file="${file//'\'//}"
cp -vr ."${file}" output/
cp -r ."${file}" output/
done<"${CONFIG}"
echo "rename drivers..."
find output -type f -name '*.inf_'|while read -r line
do mv -v "${line}" "${line//.inf_/.inf}"
do mv "${line}" "${line//.inf_/.inf}"
done
echo "done"