Files
DevFlow/docs/02-架构设计/专项设计/.research/fetch_larksdk.ps1
T

11 lines
662 B
PowerShell

$ErrorActionPreference = 'Stop'
$zip = "$env:TEMP\larksdk.zip"
$dir = "$env:TEMP\larksdk"
curl.exe -sL "https://goproxy.cn/github.com/larksuite/oapi-sdk-go/v3/@v/v3.12.0.zip" -o $zip
if (Test-Path $dir) { Remove-Item -Recurse -Force $dir }
Expand-Archive -Path $zip -DestinationPath $dir -Force
Write-Host "=== ws 相关文件 ==="
Get-ChildItem -Recurse $dir -Filter *.go | Where-Object { $_.FullName -match '\\ws\\|ws\\.go|longconn' } | ForEach-Object { $_.FullName.Replace($dir, '') }
Write-Host "`n=== 顶层目录 ==="
Get-ChildItem $dir | ForEach-Object { Get-ChildItem $_.FullName -Directory | Select-Object -ExpandProperty Name } | Select-Object -Unique