20 lines
887 B
PowerShell
20 lines
887 B
PowerShell
# Deploy the patched Ventoy grub.cfg (Russian default language) to p2.
|
|
$src = 'C:\PF\Ventoy\vtoyefi\grub\grub.cfg'
|
|
$dst = 'G:\grub\grub.cfg'
|
|
$bkp = 'C:\PF\Ventoy\backup\grub.cfg.before-ru-default'
|
|
|
|
if (Test-Path $dst) {
|
|
Copy-Item $dst $bkp -Force
|
|
Copy-Item $src $dst -Force
|
|
'disk : {0} bytes {1}' -f (Get-Item $dst).Length, (Get-FileHash $dst -Algorithm SHA256).Hash.ToLower()
|
|
'source: {0} bytes {1}' -f (Get-Item $src).Length, (Get-FileHash $src -Algorithm SHA256).Hash.ToLower()
|
|
'--- check:'
|
|
Select-String -Path $dst -Pattern 'vt_init_menu_lang' | ForEach-Object { ' ' + $_.Line.Trim() }
|
|
'--- other patches still present:'
|
|
foreach ($s in 'VTOY_DATA_PART_IDX', 'ISO/Ventoy/ventoy.json', 'SSTR/BCD') {
|
|
' {0}: {1}' -f $s, (Select-String -Path $dst -Pattern ([regex]::Escape($s)) | Measure-Object).Count
|
|
}
|
|
} else {
|
|
'G: not available'
|
|
}
|