Skip to content

Commit

Permalink
init.ps1 optional copying of package data for our manager.
Browse files Browse the repository at this point in the history
Part of 9bb2cd3
  • Loading branch information
3F committed Jan 21, 2020
1 parent 95d9e33 commit 8620ee6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@ param($installPath, $toolsPath, $package, $project)
$manager = "DllExport.bat"
Copy-Item "$installPath\\$manager" "$PWD" -Force

$pdir = "$PWD\\packages\\DllExport." + $package.Version
if(!(Test-Path -Path $pdir)) {
Get-ChildItem -Path $installPath | ForEach-Object {
if($_.PSIsContainer) {
# without this some files in subdirs can be copied in root folder: https://github.com/3F/coreclr/blob/4fde65a5695d8d4c2f73959e71fb38357ae02a28/pack.ps1
$null = New-Item -ItemType Directory -Force -Path ($pdir + '\\' + $_.Name)
}
Copy-Item $_.fullname $pdir -Recurse -Force
}
}

$project.Save($project.FullPath)
Start-Process -FilePath ".\\$manager" -WorkingDirectory "$PWD"

0 comments on commit 8620ee6

Please sign in to comment.