about summary refs log tree commit diff
path: root/library/compiler-builtins/ci/update-musl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'library/compiler-builtins/ci/update-musl.sh')
-rwxr-xr-xlibrary/compiler-builtins/ci/update-musl.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/library/compiler-builtins/ci/update-musl.sh b/library/compiler-builtins/ci/update-musl.sh
new file mode 100755
index 00000000000..b71cf577830
--- /dev/null
+++ b/library/compiler-builtins/ci/update-musl.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Download musl to a repository for `musl-math-sys`
+
+set -eux
+
+url=git://git.musl-libc.org/musl
+ref=c47ad25ea3b484e10326f933e927c0bc8cded3da
+dst=crates/musl-math-sys/musl
+
+if ! [ -d "$dst" ]; then
+    git clone "$url" "$dst" --single-branch --depth=1000
+fi
+
+git -C "$dst" fetch "$url" --depth=1
+git -C "$dst" checkout "$ref"