-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathUpdate-Profile.ps1
More file actions
21 lines (16 loc) · 692 Bytes
/
Update-Profile.ps1
File metadata and controls
21 lines (16 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<#
.SYNOPSIS
Quick command line to pull latest source of the WindowsPowerShell repo from Github
#>
# strip off .\Modules\Scripts to get to .\WindowsPowerShell
$repo = $PSCommandPath | Split-Path -parent | Split-Path -parent | Split-Path -parent
if (!(Test-Path "$repo\.git" -PathType Container))
{
Write-Host '... Profile location is not a cloned git repo.' -ForegroundColor Yellow
Write-Host '... Clone from https://github.com/stevencohn/WindowsPowerShell.git' -ForegroundColor Yellow
return
}
Push-Location $repo
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
git -c diff.mnemonicprefix=false -c core.quotepath=false pull --no-commit origin main
Pop-Location