Skip to content

Commit 621a3bb

Browse files
gautricsunfishcode
authored andcommitted
Use standard shell variable syntax
use ${} instead of []
1 parent a927856 commit 621a3bb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@ sources mentioned above, and compile with
2626

2727
A typical installation from the release binaries might look like the following:
2828
```shell script
29-
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-[VERSION]/wasi-sdk-[VERSION]-linux.tar.gz
30-
tar xvf wasi-sdk-[VERSION]-linux.tar.gz
29+
export WASI_VERSION=12
30+
export WASI_VERSION_FULL=${WASI_VERSION}.0
31+
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz
32+
tar xvf wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz
3133
```
3234

3335
## Use
3436

3537
Use the clang installed in the wasi-sdk directory:
3638
```shell script
37-
CC="[WASI_SDK_PATH]/bin/clang --sysroot=[WASI_SDK_PATH]/share/wasi-sysroot"
39+
export WASI_SDK_PATH=`pwd`/wasi-sdk-${WASI_VERSION_FULL}
40+
CC="${WASI_SDK_PATH}/bin/clang --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot"
3841
$CC foo.c -o foo.wasm
3942
```
40-
Note: `[WASI_SDK_PATH]/share/wasi-sysroot` contains the WASI-specific includes/libraries/etc. The `--sysroot=...` option
43+
Note: `${WASI_SDK_PATH}/share/wasi-sysroot` contains the WASI-specific includes/libraries/etc. The `--sysroot=...` option
4144
is not necessary if `WASI_SDK_PATH` is `/opt/wasi-sdk`.
4245

4346
## Notes for Autoconf

0 commit comments

Comments
 (0)