From 33a248e419fa961691ec346727b297229555e3a0 Mon Sep 17 00:00:00 2001 From: Kitty Cat Date: Sun, 7 Jul 2024 16:49:03 -0400 Subject: [PATCH] initenv: install git using winget --- initenv.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/initenv.ps1 b/initenv.ps1 index c43bae9..e067af7 100644 --- a/initenv.ps1 +++ b/initenv.ps1 @@ -32,6 +32,13 @@ if (!(Get-WinGetPackage -Source "winget" -MatchOption "Equals" -Id "vim.vim")) { Install-WinGetPackage -Source "winget" -MatchOption "Equals" -Id "vim.vim" } +# Install git +if (!(Get-WinGetPackage -Source "winget" -MatchOption "Equals" -Id "Git.Git")) { + Write-Host "Installing Git" + Install-WinGetPackage -Source "winget" -MatchOption "Equals" -Id "Git.Git" + & 'C:\Program Files\Git\cmd\git.exe' config --global core.autocrlf false +} + # sshd if (-not (Get-WindowsCapability -Online | Where-Object Name -EQ "OpenSSH.Server~~~~0.0.1.0" | Where-Object State -EQ "Installed")) { echo "Installing sshd"