Skip to content

Commit

Permalink
revert to expand-archive
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatao Li committed Apr 16, 2019
1 parent 94cd67f commit c82e90e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ Write-Host Determining latest release...
$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name

$download = "https://github.com/$repo/releases/download/$tag/$file"
$zip = "pses.zip"

new-item -Name $dir -ItemType directory -Force
Write-Host Dowloading $tag
Invoke-WebRequest $download -Out $file
$file = Get-Item $file
Invoke-WebRequest $download -Out $zip

Write-Host Extracting release files...
Expand-Archive $zip -Force

$shell = new-object -com shell.application
$zip = $shell.NameSpace($file.FullName)
foreach($item in $zip.items()) { $shell.Namespace($file.DirectoryName).copyhere($item) }

Remove-Item $file -Force
Remove-Item $zip -Force
Write-Host install completed.

0 comments on commit c82e90e

Please sign in to comment.