Skip to content
Snippets Groups Projects
Commit 9544a1e3 authored by ghuter's avatar ghuter
Browse files

the option to dump all options is now a long option

parent 27b49149
No related tags found
3 merge requests!9fix sensor example (doc),!4Amd, Tests, Doc, CI/CD,!3Amd, tests, doc...
...@@ -68,7 +68,7 @@ readme: $(BIN) ...@@ -68,7 +68,7 @@ readme: $(BIN)
sh ./tools/update-readme-usage.sh sh ./tools/update-readme-usage.sh
man: $(BIN) man: $(BIN)
awk -v "usage=$$($(BIN_DIR)/$(BIN) -1)" \ awk -v "usage=$$($(BIN_DIR)/$(BIN) --dump-opts)" \
'/^USAGE/ { $$0=usage } 1' \ '/^USAGE/ { $$0=usage } 1' \
doc/$(BIN).pre.1 > doc/$(BIN).1 2>/dev/null doc/$(BIN).pre.1 > doc/$(BIN).1 2>/dev/null
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include "util.h" #include "util.h"
...@@ -219,7 +220,7 @@ int main(int argc, char **argv) ...@@ -219,7 +220,7 @@ int main(int argc, char **argv)
usage(argv); usage(argv);
} }
if (argc == 2 && argv[1][0] == '-' && argv[1][1] == '1' && argv[1][2] == '\0') { if (argc == 2 && strcmp(argv[1], "--dump-opts") == 0) {
dumpopts(opts, NB_OPT, NB_SENSOR_OPT); dumpopts(opts, NB_OPT, NB_SENSOR_OPT);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment