mirror of
https://github.com/r4sas/chocolatey-packages
synced 2025-01-20 11:50:04 +00:00
30 lines
1.3 KiB
PowerShell
30 lines
1.3 KiB
PowerShell
$ErrorActionPreference = 'Stop'; # stop on all errors
|
|
$packagename = 'i2pd'
|
|
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
|
|
$url = 'https://github.com/PurpleI2P/i2pd/releases/download/2.30.0/i2pd_2.30.0_win32_mingw.zip'
|
|
$checksum = 'a941078877b12346ea25acf625fd2998410b1a1c5f5c7ecf798399d0ba3ebc38'
|
|
$checksumType = 'sha256'
|
|
$url64 = 'https://github.com/PurpleI2P/i2pd/releases/download/2.30.0/i2pd_2.30.0_win64_mingw.zip'
|
|
$checksum64 = '0734238e3fa3b51b509ba009a6c518f06e85d2fc77ead82e9fc05277a1e0744d'
|
|
$checksumType64 = 'sha256'
|
|
|
|
Install-ChocolateyZipPackage -packageName "$packagename" `
|
|
-UnzipLocation "$toolsDir" `
|
|
-Url "$url" `
|
|
-checksum "$checksum" `
|
|
-checksumType "$checksumType" `
|
|
-Url64 "$url64" `
|
|
-checksum64 "$checksum64" `
|
|
-checksumType64 "$checksumType64"
|
|
|
|
# Install configs and certificates if i2pd dir not available, otherwise just update certificates
|
|
$dataDir = Join-Path $Env:APPDATA 'i2pd'
|
|
if (Test-Path -Path $dataDir) {
|
|
Write-Host "Updating i2pd certificates"
|
|
Remove-Item $dataDir\certificates -Recurse
|
|
Copy-Item $toolsDir\contrib\certificates -Destination $dataDir\certificates -Recurse
|
|
} else {
|
|
Write-Host "Copying default configs and certificates"
|
|
Copy-Item $toolsDir\contrib -Destination $dataDir -Recurse
|
|
}
|