configure-msys2.sh 1.13 KB
Newer Older
1
2
3
4
5
6
#!/bin/sh

## execute using bash C:\Rtools\usr\bin\bash.exe

# Add repository
sed -i.bak -e "s/^#\[msys\]/\[msys\]/" -e "s/^#Include/Include/" /etc/pacman.conf
7
8
9
10
#echo -e "Server = http://repo.msys2.org/mingw/\$arch/" >> /etc/pacman.d/mirrorlist.msys
#echo -e "Server = http://repo.msys2.org/mingw/x86_64/" >> /etc/pacman.d/mirrorlist.mingw64
echo -e "Server = https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/\$arch/" >> /etc/pacman.d/mirrorlist.msys
echo -e "Server = https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/x86_64/" >> /etc/pacman.d/mirrorlist.mingw64
11
12
13
14
15
16
17
18
19
20
21
22

# Update server gpg key
curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
pacman -U msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz --noconfirm
pacman --noconfirm -U --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz

# Update msys2 (just one time to keep Rtools dependences versions)
pacman -Syuu --noconfirm

#pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights --noconfirm