Move helpers to the separate repository

This commit is contained in:
Maxim Lobanov
2020-04-16 17:22:06 +03:00
parent e90177ce73
commit 8affb5df76
15 changed files with 946 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<#
.SYNOPSIS
Pack folder to *.zip format
#>
function Pack-Zip {
param(
[Parameter(Mandatory=$true)]
[String]$PathToArchive,
[Parameter(Mandatory=$true)]
[String]$ToolZipFile
)
Write-Debug "Pack $PathToArchive to $ToolZipFile"
Push-Location -Path $PathToArchive
zip -q -r $ToolZipFile * | Out-Null
Pop-Location
}
<#
.SYNOPSIS
Unpack *.tar file
#>
function Unpack-TarArchive {
param(
[Parameter(Mandatory=$true)]
[String]$ArchivePath,
[Parameter(Mandatory=$true)]
[String]$OutputDirectory
)
Write-Debug "Unpack $ArchivePath to $OutputDirectory"
tar -C $OutputDirectory -xzf $ArchivePath
}