Use `getopts` to handle CLI arguments in lower-level scripts
atreyasha opened this issue Β· comments
π Feature Request
Checklist
- No duplicate issues/PRs
- Are you running the latest
downgrade
release from the AUR?
Background
Currently, we handle CLI argument parsing on our own (i.e. without external tools).
Proposed feature
Our workflow would benefit from using getopt
to aid CLI argument parsing.
We should use POSIX's getopts
instead of Bash's getopt
for reasons mentioned here:
Since getopt
only support short arguments, we could use these specifically for lower-level scripts that downgrade
calls.