1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-25 20:18:01 +02:00
nerd-fonts/chocolatey/tools/chocolateyinstall.ps1

20 lines
627 B
PowerShell
Raw Normal View History

2018-04-15 17:42:29 +02:00
$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