Skip to content

Commit

Permalink
Expand twice .tar.gz archive
Browse files Browse the repository at this point in the history
  • Loading branch information
kai2nenobu committed Jun 16, 2019
1 parent 3a9adc8 commit 39b4568
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pet/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

$toolsPath = Split-Path $MyInvocation.MyCommand.Definition

ls $toolsPath\* | ? { $_.PSISContainer } | rm -Recurse -Force #remove older package dirs

# Expand .tar.gz
$packageArgs = @{
PackageName = 'pet'
FileFullPath = Get-Item "$toolsPath\*_windows_386.tar.gz"
FileFullPath64 = Get-Item "$toolsPath\*_windows_amd64.tar.gz"
Destination = $toolsPath
}
Get-ChocolateyUnzip @packageArgs

ls $toolsPath\* | ? { $_.PSISContainer } | rm -Recurse -Force #remove older package dirs
# Expand .tar
$packageArgs.FileFullPath = $packageArgs.FileFullPath -replace '\.gz$',''
$packageArgs.FileFullPath64 = $packageArgs.FileFullPath64 -replace '\.gz$',''
$packageArgs | Format-Table
Get-ChocolateyUnzip @packageArgs

rm $toolsPath\*.tar.gz -ea 0
rm $toolsPath\*.tar -ea 0

0 comments on commit 39b4568

Please sign in to comment.