-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.ps1
More file actions
23 lines (19 loc) · 1.08 KB
/
init.ps1
File metadata and controls
23 lines (19 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$env:repository = "$HOME\git\dotfiles_windows"
# If repo and pwsh is already there just update it and run script again
if (Test-Path $env:repository\setup.ps1) {
Set-Location $env:repository
git pull
pwsh -NoProfile .\setup.ps1
}
# Git and PowerShellCore installation
# https://github.com/microsoft/terminal/pull/18639
# https://github.com/PowerShell/PowerShell-RFC/blob/master/Draft-Accepted/RFC0065-Install-PowerShell.md
# NOTE: git - https://github.com/git-for-windows/build-extra/pull/665
winget install -h --accept-package-agreements --accept-source-agreements 9mz1snwt0n5d Git.Git
# Refresh env so git will be present in PATH
# NOTE: no longer needed when using pwsh https://github.com/microsoft/winget-cli/issues/549#issuecomment-4138950687
# Invoke-WebRequest -Uri "https://raw.githubusercontent.com/badrelmers/RefrEnv/main/refrenv.ps1" -OutFile "$HOME/refrenv.ps1"
# . "$HOME/refrenv.ps1"
iwr "https://raw.githubusercontent.com/badrelmers/RefrEnv/main/refrenv.ps1" | iex
git clone "https://github.com/soredake/dotfiles_windows" $env:repository
pwsh -NoProfile $env:repository\setup.ps1