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

Fix error and warnings in install script #1320

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Changes from all 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
6 changes: 3 additions & 3 deletions docs/_installer/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ main() {

which rustup > /dev/null 2>&1
need_ok "failed to find Rust installation, is rustup installed?"
local _rustup=`which rustup`
local _rustup=$(which rustup)
local _tardir="wasm-pack-$VERSION-${_arch}"
local _url="$UPDATE_ROOT/${_tardir}.tar.gz"
local _dir="$(mktemp -d 2>/dev/null || ensure mktemp -d -t wasm-pack)"
Expand Down Expand Up @@ -98,7 +98,7 @@ get_architecture() {
set -u


if [ "$_ostype" = Darwin -a "$_cputype" = i386 ]; then
if [ "$_ostype" = Darwin ] && [ "$_cputype" = i386 ]; then
# Darwin `uname -s` lies
if sysctl hw.optional.x86_64 | grep -q ': 1'; then
local _cputype=x86_64
Expand Down Expand Up @@ -136,7 +136,7 @@ get_architecture() {
esac

# See https://github.com/rustwasm/wasm-pack/pull/1088
if [ "$_cputype" == "aarch64" ] && [ "$_ostype" == "apple-darwin" ]; then
if [ "$_cputype" = "aarch64" ] && [ "$_ostype" = "apple-darwin" ]; then
_cputype="x86_64"
fi

Expand Down
Loading