t2linux / wiki

Repository for the t2linux.org wiki
https://wiki.t2linux.org
Creative Commons Attribution Share Alike 4.0 International
166 stars 60 forks source link

tools: improve firmware script #525

Closed soopyc closed 2 months ago

soopyc commented 2 months ago

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

soopyc commented 2 months ago

Force-pushed to fix the superfluous \? escape.

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