Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize bash script #114

Merged
merged 3 commits into from
Jul 19, 2022
Merged

Conversation

svenstaro
Copy link
Contributor

@svenstaro svenstaro commented Jul 19, 2022

This improves a few things about the install script:

  • Set strict mode and check that there are no unset variables and fix instances of where that is currently the case
  • Use bash builtin conditional characters
  • Restructure the export file logic and only make it output to shell if EXPORT_FILE is unset

Fixes #113.

@svenstaro
Copy link
Contributor Author

I think the CI failure isn't caused by this.

@SergioGasquez
Copy link
Member

Thanks for the contribution! The CI failure is due to: esp-rs/esp-idf-sys#99

@svenstaro
Copy link
Contributor Author

Thanks for the contribution! The CI failure is due to: esp-rs/esp-idf-sys#99

Is this blocking this PR?

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this blocking this PR?

No
LGTM! Thanks again!

@svenstaro svenstaro force-pushed the better-structure branch 2 times, most recently from 6ad344e to 5c56903 Compare July 19, 2022 08:46
We now either output stuff to the shell or output to the EXPORT_FILE.
Before we sometimes had unset variables in the script but it help to be stricter about this
so that this doesn't happen anymore in the future.
@georgik georgik changed the base branch from main to build/1.62.1.0 July 19, 2022 09:48
@georgik
Copy link
Collaborator

georgik commented Jul 19, 2022

Thank you @svenstaro for a great improvement of the code. Initial tests seem to be ok. Let's include changes in the new installer for 1.62.1.0, which will also contain several fixes to the compiler.

@georgik georgik merged commit 7811212 into esp-rs:build/1.62.1.0 Jul 19, 2022
@svenstaro svenstaro deleted the better-structure branch July 19, 2022 10:02
@SergioGasquez
Copy link
Member

set -u seems to make the installer crash on macos with:

install-rust-toolchain.sh: line 141: POSITIONAL[@]: unbound variable

Using POSITIONAL="" in definition of POSTIONAL seems to solve it but I am not sure if there are any implications of this change.

georgik added a commit that referenced this pull request Jul 22, 2022
* Modernize bash script (#114)
* ci: update version to 1.62.1.0
* Add argument to select LLVM mode (minified or full) (#120)
* Feature/windows gnu toolchain (#123)

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running ./install-rust-toolchain.sh without args results in error
3 participants