diff --git a/install.ps1 b/install.ps1 index de3c7e4..99187c5 100644 --- a/install.ps1 +++ b/install.ps1 @@ -36,7 +36,8 @@ if (Test-Path $SourcesFile) { $TmpDir = Join-Path $env:TEMP "ag-sync-$($Source.name)" if (Test-Path $TmpDir) { Remove-Item -Recurse -Force $TmpDir } git clone --depth 1 $Source.url $TmpDir 2>$null - $SrcPath = Join-Path $TmpDir ($Source.path ?? "skills") + $SkillPath = if ($Source.path) { $Source.path } else { "skills" } + $SrcPath = Join-Path $TmpDir $SkillPath if (Test-Path $SrcPath) { Get-ChildItem -Path $SrcPath -Directory | ForEach-Object { Copy-Item -Path $_.FullName -Destination (Join-Path $Dest $_.Name) -Recurse -Force