Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit ae31b8d

Browse files
committed
Add a script for downloading musl
1 parent 637b7b3 commit ae31b8d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

ci/download-musl.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
# Download the expected version of musl to a directory `musl`
3+
4+
set -eux
5+
6+
fname=musl-1.2.5.tar.gz
7+
sha=a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4
8+
9+
mkdir musl
10+
curl "https://musl.libc.org/releases/$fname" -O
11+
12+
case "$(uname -s)" in
13+
MINGW*)
14+
# Need to extract the second line because certutil does human output
15+
fsha=$(certutil -hashfile "$fname" SHA256 | sed -n '2p')
16+
[ "$sha" = "$fsha" ] || exit 1
17+
;;
18+
*)
19+
echo "$sha $fname" | shasum -a 256 --check || exit 1
20+
;;
21+
esac
22+
23+
tar -xzf "$fname" -C musl --strip-components 1
24+
rm "$fname"

0 commit comments

Comments
 (0)