1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
nerd-fonts/chocolatey/tools/chocolateyinstall.ps1
2018-04-15 21:12:29 +05:30

20 lines
627 B
PowerShell

$tools = Split-Path $MyInvocation.MyCommand.Definition
$package = Join-Path (Split-Path $tools) "fonts"
function Get-CurrentDirectory
{{
$thisName = $MyInvocation.MyCommand.Name
[IO.Path]::GetDirectoryName((Get-Content function:$thisName).File)
}}
Install-ChocolateyZipPackage `
-PackageName "$env:ChocolateyPackageName" `
-Url 'https://github.com/ryanoasis/nerd-fonts/releases/download/{version}/{font}.zip' `
-Checksum '{hash}' `
-ChecksumType 'SHA256' `
-UnzipLocation $package
$AddFont = Join-Path (Get-CurrentDirectory) 'Add-Font.ps1'
& $AddFont -Path "$package"
Remove-Item -Recurse -Force $package