summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2019-11-03 13:08:21 -0500
committerJason Woodward2019-11-03 13:08:21 -0500
commit64002dc07f5006d56907f8a7f7c08fe88c66bda2 (patch)
treec106326bb230b7ddb1b26c7cb11efdff69c41521
parent3a8406e9110d00b79eba6030deb382859db26fe2 (diff)
downloadslapt-src-master.tar.gz
fix short argument parsing, thanks Rudolf MüllerHEADmaster
-rw-r--r--src/main.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/main.c b/src/main.c
index aa0e87e..f158ec8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -136,32 +136,35 @@ int main(int argc, char *argv[])
int only_flags = 0;
static struct option long_options[] = {
- {"version", no_argument, 0, VERSION_OPT},
- {"help", no_argument, 0, HELP_OPT},
- {"update", no_argument, 0, UPDATE_OPT},
- {"upgrade-all", no_argument, 0, UPGRADE_OPT},
- {"U", no_argument, 0, UPGRADE_OPT},
- {"list", no_argument, 0, LIST_OPT},
+ {"build", required_argument, 0, BUILD_OPT},
+ {"b", required_argument, 0, BUILD_OPT},
+ {"build-only", no_argument, 0, BUILD_ONLY_OPT},
+ {"B", no_argument, 0, BUILD_ONLY_OPT},
{"clean", no_argument, 0, CLEAN_OPT},
{"e", no_argument, 0, CLEAN_OPT},
+ {"config", required_argument, 0, CONFIG_OPT},
+ {"c", required_argument, 0, CONFIG_OPT},
+ {"fetch", required_argument, 0, FETCH_OPT},
+ {"f", required_argument, 0, FETCH_OPT},
+ {"fetch-only", no_argument, 0, FETCH_ONLY_OPT},
+ {"F", no_argument, 0, FETCH_ONLY_OPT},
+ {"help", no_argument, 0, HELP_OPT},
+ {"install", required_argument, 0, INSTALL_OPT},
+ {"list", no_argument, 0, LIST_OPT},
+ {"no-dep", no_argument, 0, NODEP_OPT},
+ {"postprocess", required_argument, 0, POSTCMD_OPT},
{"search", required_argument, 0, SEARCH_OPT},
{"s", required_argument, 0, SEARCH_OPT},
{"show", required_argument, 0, SHOW_OPT},
{"w", required_argument, 0, SHOW_OPT},
- {"fetch", required_argument, 0, FETCH_OPT},
- {"build", required_argument, 0, BUILD_OPT},
- {"install", required_argument, 0, INSTALL_OPT},
- {"yes", no_argument, 0, YES_OPT},
{"simulate", no_argument, 0, SIMULATE_OPT},
{"t", no_argument, 0, SIMULATE_OPT},
- {"no-dep", no_argument, 0, NODEP_OPT},
- {"config", required_argument, 0, CONFIG_OPT},
- {"c", required_argument, 0, CONFIG_OPT},
- {"postprocess", required_argument, 0, POSTCMD_OPT},
- {"build-only", no_argument, 0, BUILD_ONLY_OPT},
- {"B", no_argument, 0, BUILD_ONLY_OPT},
- {"fetch-only", no_argument, 0, FETCH_ONLY_OPT},
- {"F", no_argument, 0, FETCH_ONLY_OPT},
+ {"update", no_argument, 0, UPDATE_OPT},
+ {"u", no_argument, 0, UPDATE_OPT},
+ {"upgrade-all", no_argument, 0, UPGRADE_OPT},
+ {"U", no_argument, 0, UPGRADE_OPT},
+ {"yes", no_argument, 0, YES_OPT},
+ {"version", no_argument, 0, VERSION_OPT},
{0, 0, 0, 0}};
/* initialization */