Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make install an optional dependency and add 32-bit arm targets #2214

Merged
merged 8 commits into from
Jul 1, 2024
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions www/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,8 @@ command -v curl > /dev/null 2>&1 ||
command -v wget > /dev/null 2>&1 ||
err "need wget or curl (command not found)"

need install
need mkdir
need mktemp
need tar

if [ -z "${tag-}" ]; then
need grep
Expand Down Expand Up @@ -131,10 +129,12 @@ if [ -z "${target-}" ]; then
uname_target="$(uname -m)-$kernel"

case $uname_target in
aarch64-Linux) target=aarch64-unknown-linux-musl;;
arm64-Darwin) target=aarch64-apple-darwin;;
x86_64-Darwin) target=x86_64-apple-darwin;;
x86_64-Linux) target=x86_64-unknown-linux-musl;;
aarch64-Linux) target=aarch64-unknown-linux-musl;;
arm64-Darwin) target=aarch64-apple-darwin;;
armv6l-Linux) target=arm-unknown-linux-musleabihf;;
armv7l-Linux) target=armv7-unknown-linux-musleabihf;;
x86_64-Darwin) target=x86_64-apple-darwin;;
x86_64-Linux) target=x86_64-unknown-linux-musl;;
x86_64-MINGW64_NT) target=x86_64-pc-windows-msvc;;
x86_64-Windows_NT) target=x86_64-pc-windows-msvc;;
*)
Expand All @@ -146,7 +146,7 @@ fi

case $target in
x86_64-pc-windows-msvc) extension=zip; need unzip;;
*) extension=tar.gz;;
*) extension=tar.gz; need tar;;
esac

archive="$releases/download/$tag/$crate-$tag-$target.$extension"
Expand All @@ -171,7 +171,8 @@ if [ -e "$dest/just" ] && [ "$force" = false ]; then
err "\`$dest/just\` already exists"
else
mkdir -p "$dest"
install -m 755 "$td/just" "$dest"
cp "$td/just" "$dest/just"
chmod 755 "$dest/just"
fi

rm -rf "$td"