Skip to content

Commit

Permalink
refactor: ⚡️ Add export file by default (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez authored Sep 22, 2022
1 parent 8eb3f7c commit 8e9c830
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ No prerequisites are needed for macOS.
git clone https://github.com/esp-rs/rust-build.git
cd rust-build
./install-rust-toolchain.sh
. export-esp.sh
```

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

```
./install-rust-toolchain.sh --toolchain-version 1.64.0.0 --export-file export-esp-rust.sh
source export-esp-rust.sh
./install-rust-toolchain.sh --toolchain-version 1.64.0.0
. export-esp.sh
```
#### Arguments
- `-b|--build-target`: Comma separated list of targets [`esp32,esp32s2,esp32s3,esp32c3,all`]. Defaults to: `esp32,esp32s2,esp32s3`
- `-c|--cargo-home`: Cargo path.
- `-d|--toolchain-destination`: Toolchain instalation folder. Defaults to: `<rustup_home>/toolchains/esp`
- `-e|--extra-crates`: Extra crates to install. Defaults to: `ldproxy cargo-espflash`
- `-f|--export-file`: Destination of the export file generated.
- `-f|--export-file`: Destination of the export file generated. Defaults to: `export-esp.sh`
- `-i|--installation-mode`: Installation mode: [`install, reinstall, uninstall`]. Defaults to: `install`
- `-k|--minified-llvm`: Use minified LLVM. Possible values: [`YES, NO`]. Defaults to: `YES`
- `-l|--llvm-version`: LLVM version.
Expand Down
4 changes: 2 additions & 2 deletions install-rust-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ESP_IDF_VERSION=""
MINIFIED_ESP_IDF="NO"
IS_XTENSA_INSTALLED=0
SYSTEM_PACKAGES="openssl@3"
EXPORT_FILE=""
EXPORT_FILE="export-esp.sh"

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

0 comments on commit 8e9c830

Please sign in to comment.