Install/OnPrem/Solr/PreInstalled/Create-SolrConfigSetsPackage.ps1

. "$PSScriptRoot\..\SolrParams.ps1" -Force
$ErrorActionPreference = "Stop"

Write-Output "Create Solr config sets package started..."

$prefix = $global:Configuration.prefix
$configSetsDir = "$SolrTempDir\server\solr"
$saveDir = Get-Location

Get-ChildItem $configSetsDir -Filter "$prefix*" -Directory  | Compress-Archive  -DestinationPath "$saveDir\SitecoreSolrConfigSets" -CompressionLevel Optimal
Remove-Item (Split-Path -Path $SolrTempDir) -Recurse -Force | Out-Null

Write-Output "Create Solr config sets package done."