guoyu/自动修复UTS编译.ps1
2025-12-06 20:11:36 +08:00

24 lines
847 B
PowerShell

# UTS编译自动修复脚本
Write-Host "🔧 UTS编译监控已启动..." -ForegroundColor Green
Write-Host "按 Ctrl+C 停止监控" -ForegroundColor Yellow
Write-Host ""
$utsDir = "$env:APPDATA\HBuilder X\.uts-development-android\gradle"
while ($true) {
# 查找所有 xwq-speech-to-text 目录
$dirs = Get-ChildItem -Path $utsDir -Filter "xwq-speech-to-text_*" -Directory -ErrorAction SilentlyContinue
foreach ($dir in $dirs) {
$appDir = Join-Path $dir.FullName "app"
if (-not (Test-Path $appDir)) {
Write-Host "⚡ 检测到缺失目录,正在创建: $appDir" -ForegroundColor Cyan
New-Item -ItemType Directory -Path $appDir -Force | Out-Null
Write-Host "✅ 已创建: $appDir" -ForegroundColor Green
}
}
Start-Sleep -Milliseconds 500
}