|
|
@ -25,18 +25,15 @@ function Create-TarArchive {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
$arguments = @(
|
|
|
|
$arguments = @(
|
|
|
|
"-c",
|
|
|
|
"-c", "--$CompressionType"
|
|
|
|
"-f", $ArchivePath,
|
|
|
|
|
|
|
|
"."
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
If ($CompressionType) {
|
|
|
|
|
|
|
|
$arguments += "--${CompressionType}"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($DereferenceSymlinks) {
|
|
|
|
if ($DereferenceSymlinks) {
|
|
|
|
$arguments += "-h"
|
|
|
|
$arguments += "-h"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$arguments += @("-f", $ArchivePath, ".")
|
|
|
|
|
|
|
|
|
|
|
|
Push-Location $SourceFolder
|
|
|
|
Push-Location $SourceFolder
|
|
|
|
Write-Debug "tar $arguments"
|
|
|
|
Write-Debug "tar $arguments"
|
|
|
|
tar @arguments
|
|
|
|
tar @arguments
|
|
|
|