-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinstall-msys2.ps1
More file actions
26 lines (18 loc) · 916 Bytes
/
install-msys2.ps1
File metadata and controls
26 lines (18 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$erroractionpreference = 'stop'
if (-not (test-path /msys64)) {
winget install --force msys2.msys2 --source winget
}
$nsswitch_conf = '/msys64/etc/nsswitch.conf'
$pacman_conf = '/msys64/etc/pacman.conf'
@(gc $nsswitch_conf) | %{ $_ -replace '^db_home:.*','db_home: windows' } | set-content $nsswitch_conf
@(gc $pacman_conf) | %{ $_ -replace '^CheckSpace','#CheckSpace' } | set-content $pacman_conf
$env:MSYSTEM = 'MSYS'
1..5 | %{ /msys64/usr/bin/bash -l -c 'pacman -Syu --noconfirm' }
/msys64/usr/bin/bash -l -c 'pacman -S --noconfirm --needed man-db vim git openssh tmux tree mingw-w64-clang-x86_64-ripgrep'
if (-not (test-path ~/.bash_profile)) {
"source ~/.bashrc`n" | set-content ~/.bash_profile
}
if (-not (test-path ~/.bashrc)) {
# SET BACK TO MASTER ON FINAL COMMIT
iwr 'https://raw.githubusercontent.com/rkitover/windows-dev-guide/refs/heads/master/.bashrc' -out ~/.bashrc
}