Skip to content

Commit 86432a0

Browse files
authored
Merge 125c813 into f6f493c
2 parents f6f493c + 125c813 commit 86432a0

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed
+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env bash
22
set -eu
33

4-
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
4+
cd $(dirname "$0")
5+
6+
CARGO_BINSTALL_CHECK=$(./command-check.sh cargo-binstall)
7+
if [ $CARGO_BINSTALL_CHECK != "true" ]; then
8+
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
9+
fi

.github/scripts/command-check.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
command -v $1 >/dev/null 2>&1 && echo "true" || { echo >&2 "$1 is not installed" && echo "false"; }

compiler/wasm/scripts/install_wasm-pack.sh

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ set -eu
33

44
cd $(dirname "$0")/..
55

6-
# Install wasm-pack
7-
CARGO_BINSTALL_CHECK=$(./scripts/command-check.sh cargo-binstall)
8-
if [ $CARGO_BINSTALL_CHECK != "true" ]; then
9-
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
10-
fi
6+
../../.github/scripts/cargo-binstall-install.sh
117

8+
# Install wasm-pack
129
cargo-binstall wasm-pack@0.12.1 -y --force

0 commit comments

Comments
 (0)