You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.4 KiB
29 lines
1.4 KiB
$ErrorActionPreference = 'Stop'; # stop on all errors |
|
$packagename = 'i2pd' |
|
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" |
|
$url = 'https://github.com/PurpleI2P/i2pd/releases/download/2.40.0/i2pd_2.40.0_win32_mingw.zip' |
|
$checksum = '86de7b7e0645eea5957b9484ee2801d4d61637976acc2acbb108106c662bf21d' |
|
$checksumType = 'sha256' |
|
$url64 = 'https://github.com/PurpleI2P/i2pd/releases/download/2.40.0/i2pd_2.40.0_win64_mingw.zip' |
|
$checksum64 = '591b66f05e27fda23e5a7ac6849711b12a751ece670aefd284d76e2f43909d2b' |
|
$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 |
|
}
|
|
|