Font installs
This commit is contained in:
@@ -24,7 +24,11 @@ param (
|
|||||||
[Alias('no-npm')]
|
[Alias('no-npm')]
|
||||||
[switch]$NoNpm,
|
[switch]$NoNpm,
|
||||||
[Alias('only-npm')]
|
[Alias('only-npm')]
|
||||||
[switch]$OnlyNpm
|
[switch]$OnlyNpm,
|
||||||
|
[Alias('no-fonts')]
|
||||||
|
[switch]$NoFonts,
|
||||||
|
[Alias('only-fonts')]
|
||||||
|
[switch]$OnlyFonts
|
||||||
)
|
)
|
||||||
|
|
||||||
if ($Help)
|
if ($Help)
|
||||||
@@ -69,6 +73,7 @@ $Flags = [ordered]@{
|
|||||||
PowershellEnabled = -not $NoPowershell
|
PowershellEnabled = -not $NoPowershell
|
||||||
PipEnabled = -not $NoPip
|
PipEnabled = -not $NoPip
|
||||||
NpmEnabled = -not $NoNpm
|
NpmEnabled = -not $NoNpm
|
||||||
|
FontsEnabled = -not $NoFonts
|
||||||
}
|
}
|
||||||
|
|
||||||
function Reset-Flags
|
function Reset-Flags
|
||||||
@@ -109,6 +114,11 @@ if ($OnlyNpm)
|
|||||||
Reset-Flags
|
Reset-Flags
|
||||||
$Flags.NpmEnabled = $true
|
$Flags.NpmEnabled = $true
|
||||||
}
|
}
|
||||||
|
if ($OnlyFonts)
|
||||||
|
{
|
||||||
|
Reset-Flags
|
||||||
|
$Flags.FontsEnabled = $true
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host "These providers are enabled:"
|
Write-Host "These providers are enabled:"
|
||||||
foreach ($key in $Flags.Keys)
|
foreach ($key in $Flags.Keys)
|
||||||
@@ -205,5 +215,25 @@ if ($Flags.PowershellEnabled)
|
|||||||
Install-Module posh-git -Scope CurrentUser -Force
|
Install-Module posh-git -Scope CurrentUser -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($Flags.FontsEnabled)
|
||||||
|
{
|
||||||
|
Write-Divider
|
||||||
|
Write-Host "Installing Fonts"
|
||||||
|
Set-Location ~
|
||||||
|
Remove-Item ~\fonts | Out-Null
|
||||||
|
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/JetBrainsMono.zip
|
||||||
|
mkdir ~\fonts
|
||||||
|
Copy-Item ~\JetBrainsMono.zip ~\fonts\JetBrainsMono.zip
|
||||||
|
Set-Location ~\fonts | Out-Null
|
||||||
|
unzip JetBrainsMono.zip
|
||||||
|
Remove-Item JetBrainsMono.zip
|
||||||
|
$UserFonts = "$env:LOCALAPPDATA\Microsoft\Windows\Fonts"
|
||||||
|
New-Item -ItemType Directory -Path $UserFonts -Force | Out-Null
|
||||||
|
Get-ChildItem -Filter *.ttf | ForEach-Object {
|
||||||
|
Invoke-Item $_.FullName
|
||||||
|
}
|
||||||
|
Set-Location ~
|
||||||
|
}
|
||||||
|
|
||||||
Write-Divider
|
Write-Divider
|
||||||
Write-Host "Done!"
|
Write-Host "Done!"
|
||||||
|
|||||||
Reference in New Issue
Block a user