-
Notifications
You must be signed in to change notification settings - Fork 4
/
update-installer
executable file
·35 lines (29 loc) · 1.97 KB
/
update-installer
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
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -e
pub=/srv/msys2repo
if test -z "${1}"
then
echo "Missing installer release date." >&2
echo "Example usage: ${0} 2021-02-28" >&2
exit 1
fi
RELEASE="${1}"
shift
cd "${pub}/distrib/x86_64/"
curl --fail -sLO "https://github.com/msys2/msys2-installer/releases/download/${RELEASE}/msys2-base-x86_64-${RELEASE//-/}.tar.xz"
curl --fail -sLO "https://github.com/msys2/msys2-installer/releases/download/${RELEASE}/msys2-base-x86_64-${RELEASE//-/}.tar.xz.sig"
curl --fail -sLO "https://github.com/msys2/msys2-installer/releases/download/${RELEASE}/msys2-base-x86_64-${RELEASE//-/}.tar.zst"
curl --fail -sLO "https://github.com/msys2/msys2-installer/releases/download/${RELEASE}/msys2-base-x86_64-${RELEASE//-/}.tar.zst.sig"
curl --fail -sLO "https://github.com/msys2/msys2-installer/releases/download/${RELEASE}/msys2-x86_64-${RELEASE//-/}.exe"
curl --fail -sLO "https://github.com/msys2/msys2-installer/releases/download/${RELEASE}/msys2-x86_64-${RELEASE//-/}.exe.sig"
curl --fail -sLO "https://github.com/msys2/msys2-installer/releases/download/${RELEASE}/msys2-base-x86_64-${RELEASE//-/}.sfx.exe"
curl --fail -sLO "https://github.com/msys2/msys2-installer/releases/download/${RELEASE}/msys2-base-x86_64-${RELEASE//-/}.sfx.exe.sig"
ln -sf x86_64/$(ls -t | grep '.tar.xz$' | head -1) ../msys2-x86_64-latest.tar.xz
ln -sf x86_64/$(ls -t | grep '.tar.xz.sig$' | head -1) ../msys2-x86_64-latest.tar.xz.sig
ln -sf x86_64/$(ls -t | grep '.tar.zst$' | head -1) ../msys2-x86_64-latest.tar.zst
ln -sf x86_64/$(ls -t | grep '.tar.zst.sig$' | head -1) ../msys2-x86_64-latest.tar.zst.sig
ln -sf x86_64/$(ls -t | grep '.exe$' | grep -v '.sfx.exe$' | head -1) ../msys2-x86_64-latest.exe
ln -sf x86_64/$(ls -t | grep '.exe.sig$' | grep -v '.sfx.exe.sig$' | head -1) ../msys2-x86_64-latest.exe.sig
ln -sf x86_64/$(ls -t | grep '.sfx.exe$' | head -1) ../msys2-x86_64-latest.sfx.exe
ln -sf x86_64/$(ls -t | grep '.sfx.exe.sig$' | head -1) ../msys2-x86_64-latest.sfx.exe.sig
date +%s > "${pub}/lastupdate"