Skip to content

Instantly share code, notes, and snippets.

@adoprog
Created May 18, 2013 18:34
Show Gist options
  • Save adoprog/5605369 to your computer and use it in GitHub Desktop.
Save adoprog/5605369 to your computer and use it in GitHub Desktop.
Init
task Init {
if (-not (Test-Path $localStorage)) {
New-Item $localStorage -type directory -Verbose
}
if (-not (Test-Path $zipFile)) {
Copy-Item $distributivePath $zipFile -Verbose
}
if (-not (Test-Path $localStorage\$distributiveName)) {
sz x -y "-o$localStorage" $zipFile "$distributiveName/Website"
sz x -y "-o$localStorage" $zipFile "$distributiveName/Data"
sz x -y "-o$localStorage" $zipFile "$distributiveName/Databases"
}
if (Test-Path "$buildFolder\output") {
Remove-Item -Recurse -Force "$buildFolder\Output"
}
New-Item "$buildFolder\Output" -type directory
robocopy $localStorage\$distributiveName $buildFolder /E /XC /XN /XO
robocopy $localStorage\$distributiveName\Website\bin $buildFolder\Buildscript\Tools\Courier /E /XC /XN /XO
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment