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

tools: improve firmware script #525

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

soopyc
Copy link
Contributor

@soopyc soopyc commented May 4, 2024

This PR contains a number of improvements to the firmware script.

  1. verbosity logging is now handled with bash's getopts builtin to reduce repetition and to improve readability
  2. situations where /lib doesn't exist (e.g. nixos) is handled by mkdir -p before anything attempts to access it quitting the script to avoid breaking other distros
  3. The python logging level snippet was added since it was dumping a bunch of errors (repeated firmware) which I am pretty sure is harmless

I have tested this on

  • Macbook16,2
    • macOS 14.4.1
    • NixOS live ISO (v6.4.9-3)
    • Fedora live ISO (F40 stable v0)

@soopyc soopyc marked this pull request as draft May 4, 2024 09:15
@soopyc soopyc marked this pull request as ready for review May 4, 2024 13:25
@soopyc soopyc force-pushed the firmware-script branch from 16bbbfb to f611752 Compare May 4, 2024 13:33
@soopyc
Copy link
Contributor Author

soopyc commented May 4, 2024

Force-pushed to fix the superfluous \? escape.

Also tested working on Fedora, so I think this is good enough:tm:.

docs/tools/firmware.sh Outdated Show resolved Hide resolved
- flattened verbosity flags
  - also keep python warnings under the verbose flag
- improved formatting and indentation
- handle situations where /lib is not found
- improved prompts
@soopyc soopyc force-pushed the firmware-script branch from f611752 to 17351a0 Compare May 4, 2024 19:11
@soopyc soopyc requested a review from sharpenedblade May 4, 2024 19:14
@AdityaGarg8 AdityaGarg8 merged commit 9314a44 into t2linux:master May 6, 2024
1 check passed
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.

3 participants