Skip to content

Commit

Permalink
repack archive
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila committed Feb 15, 2023
1 parent 53cca48 commit df7eb3d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

$ErrorActionPreference = 'Stop'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$ccsFolder = "$env:LocalAppData\CCS"

if (Test-Path -Path $ccsFolder) {
Remove-Item -Path $ccsFolder -Recurse -Force | Out-Null
if (Test-Path -Path $env:LocalAppData\CCS) {
Remove-Item -Path $env:LocalAppData\CCS -Recurse -Force | Out-Null
}
New-Item -ItemType Directory -Path $ccsFolder | Out-Null

$uri = 'https://github.com/SunsetTechuila/Cursor-Colors-Synchronizer/releases/latest/download/Cursor-Colors-Synchronizer.zip'
Invoke-WebRequest -Uri $uri -OutFile $ccsFolder\Cursor-Colors-Synchronizer.zip
Expand-Archive -Path $ccsFolder\Cursor-Colors-Synchronizer.zip -DestinationPath $ccsFolder
Remove-Item -Path $ccsFolder\Cursor-Colors-Synchronizer.zip -Force
Invoke-WebRequest -Uri $uri -OutFile $env:LocalAppData\Cursor-Colors-Synchronizer.zip
Expand-Archive -Path $env:LocalAppData\Cursor-Colors-Synchronizer.zip -DestinationPath $env:LocalAppData
Remove-Item -Path $env:LocalAppData\Cursor-Colors-Synchronizer.zip -Force

Start-Process -FilePath powershell -ArgumentList "-ExecutionPolicy Bypass -NoExit -File $ccsFolder\CCS.ps1"
Start-Process -FilePath powershell -ArgumentList "-ExecutionPolicy Bypass -NoExit -File $env:LocalAppData\CCS\CCS.ps1"

0 comments on commit df7eb3d

Please sign in to comment.