]> git.corax.cc Git - toolbox/commit
include/opt: Add parser for command line parameters
authorMatthias Kruk <m@m10k.eu>
Sun, 28 Mar 2021 02:11:59 +0000 (11:11 +0900)
committerMatthias Kruk <m@m10k.eu>
Sun, 28 Mar 2021 02:32:44 +0000 (11:32 +0900)
commit35ee77fc9b63e5c7f33c3b718a3489b06650d5c2
tree890d168cb0d7a5685c61897247b14f4b7b918133
parenta7f1d5bf5fd1d8264788243dfe6b31a30ba74d63
include/opt: Add parser for command line parameters

Parsing of command line parameters and printing the help text adds
a significant amount of boilerplate code to any shell script (when
done thoroughly). This commit adds the opt module, which will parse
short and long parameters, execute callbacks, and print the help
text if either "-h" or "--help" were passed.
include/opt.sh [new file with mode: 0644]