File tree 1 file changed +11
-21
lines changed
1 file changed +11
-21
lines changed Original file line number Diff line number Diff line change @@ -81,34 +81,24 @@ cargo install pwasm-utils-cli --bin wasm-prune --force
81
81
if [[ " $OSTYPE " == " linux-gnu" ]]; then
82
82
set -e
83
83
84
- BUILD_NUM=` curl -s https://storage.googleapis.com/wasm-llvm/builds/linux/lkgr.json | jq -r ' .build' `
85
- if [ -z ${BUILD_NUM+x} ]; then
86
- echo " Could not fetch the latest build number." ;
87
- exit 1;
88
- fi
89
-
90
84
tmp=` mktemp -d`
91
85
pushd $tmp > /dev/null
92
- echo " Downloading wasm-binaries.tbz2" ;
93
- curl -L -o wasm-binaries.tbz2 https://storage.googleapis.com/wasm-llvm/builds/linux/$BUILD_NUM /wasm-binaries.tbz2
86
+
87
+ echo " Downloading wabt-1.0.33-ubuntu.tar.gz" ;
88
+ wget https://github.com/WebAssembly/wabt/releases/download/1.0.33/wabt-1.0.33-ubuntu.tar.gz
94
89
95
- declare -a binaries=(" wasm2wat" " wat2wasm" ) # Default binaries
96
- if [ " $# " -ne 0 ]; then
97
- echo " Installing selected binaries." ;
98
- binaries=(" $@ " );
99
- else
100
- echo " Installing default binaries." ;
101
- fi
90
+ tar --strip-components=2 -xf wabt-1.0.33-ubuntu.tar.gz wabt-1.0.33/bin/wasm2wat wabt-1.0.33/bin/wat2wasm
91
+
92
+ echo " Installing wasm2wat & wat2wasm into ~/.cargo/bin"
93
+ cp -f wasm2wat ~ /.cargo/bin/
94
+ cp -f wat2wasm ~ /.cargo/bin/
102
95
103
- for bin in " ${binaries[@]} "
104
- do
105
- echo " Installing $bin into ~/.cargo/bin"
106
- tar -xvjf wasm-binaries.tbz2 wasm-install/bin/$bin > /dev/null
107
- cp -f wasm-install/bin/$bin ~ /.cargo/bin/
108
- done
109
96
popd > /dev/null
110
97
fi
111
98
112
99
echo " "
113
100
echo " Run source ~/.cargo/env now to update environment."
114
101
echo " "
102
+
103
+ source ~ /.cargo/env
104
+ wasm2wat --version
You can’t perform that action at this time.
0 commit comments