Skip to content

Commit 832f30e

Browse files
committed
Fetch correct nu release on macOS
1 parent e2b098d commit 832f30e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

rustx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,22 @@
33
NU_VERSION=$(cat $(dirname $0)/.nu_version)
44

55
if [ ! -f build/nu-$NU_VERSION ]; then
6-
name=nu-$NU_VERSION-$(uname -m)-unknown-linux-musl
6+
os=$(uname -s)
7+
arch=$(uname -m)
8+
9+
case "$os" in
10+
"Darwin")
11+
[[ "$arch" == "arm64" ]] && arch="aarch64"
12+
name="nu-${NU_VERSION}-${arch}-apple-darwin"
13+
;;
14+
"Linux")
15+
name="nu-${NU_VERSION}-${arch}-unknown-linux-musl"
16+
;;
17+
*)
18+
echo "Unsupported operating system: $os" >&2
19+
exit 1
20+
;;
21+
esac
722

823
mkdir -p build/
924
cd build/

0 commit comments

Comments
 (0)