Skip to content

Commit 8e9c830

Browse files
refactor: ⚡️ Add export file by default (#144)
1 parent 8eb3f7c commit 8e9c830

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ No prerequisites are needed for macOS.
7272
git clone https://github.com/esp-rs/rust-build.git
7373
cd rust-build
7474
./install-rust-toolchain.sh
75+
. export-esp.sh
7576
```
7677

7778
Run `./install-rust-toolchain.sh --help` for more information about arguments.
@@ -83,16 +84,16 @@ Export variables are displayed at the end of the script.
8384
Installation of different version of the toolchain:
8485

8586
```
86-
./install-rust-toolchain.sh --toolchain-version 1.64.0.0 --export-file export-esp-rust.sh
87-
source export-esp-rust.sh
87+
./install-rust-toolchain.sh --toolchain-version 1.64.0.0
88+
. export-esp.sh
8889
```
8990
9091
#### Arguments
9192
- `-b|--build-target`: Comma separated list of targets [`esp32,esp32s2,esp32s3,esp32c3,all`]. Defaults to: `esp32,esp32s2,esp32s3`
9293
- `-c|--cargo-home`: Cargo path.
9394
- `-d|--toolchain-destination`: Toolchain instalation folder. Defaults to: `<rustup_home>/toolchains/esp`
9495
- `-e|--extra-crates`: Extra crates to install. Defaults to: `ldproxy cargo-espflash`
95-
- `-f|--export-file`: Destination of the export file generated.
96+
- `-f|--export-file`: Destination of the export file generated. Defaults to: `export-esp.sh`
9697
- `-i|--installation-mode`: Installation mode: [`install, reinstall, uninstall`]. Defaults to: `install`
9798
- `-k|--minified-llvm`: Use minified LLVM. Possible values: [`YES, NO`]. Defaults to: `YES`
9899
- `-l|--llvm-version`: LLVM version.

install-rust-toolchain.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ESP_IDF_VERSION=""
2525
MINIFIED_ESP_IDF="NO"
2626
IS_XTENSA_INSTALLED=0
2727
SYSTEM_PACKAGES="openssl@3"
28-
EXPORT_FILE=""
28+
EXPORT_FILE="export-esp.sh"
2929

3030
display_help() {
3131
echo "Usage: install-rust-toolchain.sh <arguments>"
@@ -34,7 +34,7 @@ display_help() {
3434
echo "-c|--cargo-home Cargo path"
3535
echo "-d|--toolchain-destination Toolchain installation folder."
3636
echo "-e|--extra-crates Extra crates to install. Defaults to: ldproxy cargo-espflash"
37-
echo "-f|--export-file Destination of the export file generated."
37+
echo "-f|--export-file Destination of the export file generated. Defaults to: export-esp.sh"
3838
echo "-i|--installation-mode Installation mode: [install, reinstall, uninstall]. Defaults to: install"
3939
echo "-k|--minified-llvm Use minified LLVM. Possible values [YES, NO]"
4040
echo "-l|--llvm-version LLVM version"

0 commit comments

Comments
 (0)