-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComposeDebug.ps1
More file actions
25 lines (22 loc) · 890 Bytes
/
ComposeDebug.ps1
File metadata and controls
25 lines (22 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Set-Location ".."
$currentPath = Get-Location
Write-Host "Script running in location $currentPath"
$plugins = Get-Item -Path ".\Plugins\Binaries\*"
$pluginNames = Get-Item -Path ".\AGNSharpBot_v2\bin\Debug\netcoreapp3.1\Plugins\*" -Filter "*.dll"
$destPath = ".\AGNSharpBot_v2\bin\Debug\netcoreapp3.1\"
foreach ( $plugin in $plugins )
{
$pluginPath = $plugin.FullName + "\bin\Debug\netcoreapp3.1\*"
if ( [System.IO.Directory]::Exists($pluginPath) )
{
$files = Get-Item -Path $pluginPath -Filter "*.dll" | Where-object { $pluginNames.Name -notcontains $_.Name }
foreach ( $file in $files )
{
if ( -not [System.IO.File]::Exists("$destPath\$($file.Name)") )
{
Copy-Item -Path $file.FullName -Destination $destPath
Write-Host "Copied $($file.Name) to main directory";
}
}
}
}