Switch to tar.gz
This commit is contained in:
@@ -12,5 +12,18 @@ function Extract-TarArchive {
|
||||
|
||||
Write-Debug "Extract $ArchivePath to $OutputDirectory"
|
||||
tar -C $OutputDirectory -xzf $ArchivePath --strip 1
|
||||
}
|
||||
|
||||
function Create-TarArchive {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String]$SourceFolder,
|
||||
[Parameter(Mandatory=$true)]
|
||||
[String]$ArchivePath,
|
||||
[string]$CompressionType = "gz"
|
||||
)
|
||||
|
||||
$CompressionArgument = If ([string]::IsNullOrWhiteSpace($CompressionType)) { "" } else { "--${CompressionType}" }
|
||||
|
||||
tar -c $CompressionArgument -f $ArchivePath "$SourceFolder\*.*"
|
||||
}
|
||||
Reference in New Issue
Block a user