Skip to content

Commit

Permalink
fix mill script for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Jan 20, 2025
1 parent 2551c4d commit ee10f29
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions mill
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,18 @@ ARTIFACT_SUFFIX=""
case "$MILL_VERSION" in
*"$MILL_NATIVE_SUFFIX")
MILL_VERSION=${MILL_VERSION%"$MILL_NATIVE_SUFFIX"}
if [ "$(uname -m)" = "aarch64" ]; then
CPU_SUFFIX="aarch64"
else
CPU_SUFFIX="amd64"
fi

if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" = "Linux" ]; then
ARTIFACT_SUFFIX="-native-linux-$CPU_SUFFIX"
if [ "$(uname -m)" = "aarch64" ]; then
ARTIFACT_SUFFIX="-native-linux-aarch64"
else
ARTIFACT_SUFFIX="-native-linux-amd64"
fi
elif [ "$(uname)" = "Darwin" ]; then
ARTIFACT_SUFFIX="-native-mac-$CPU_SUFFIX"
if [ "$(uname -m)" = "arm64" ]; then
ARTIFACT_SUFFIX="-native-mac-aarch64"
else
ARTIFACT_SUFFIX="-native-mac-amd64"
fi
else
echo "This native mill launcher supports only Linux and macOS." 1>&2
exit 1
Expand Down

0 comments on commit ee10f29

Please sign in to comment.