scripts/wrap-link.sh: Add support for -h|-help option
PATCH 1/1 scripts/wrap-link.sh: Add support for -h|-help option
Following the porting-posix tip, add support for -h|-help option.
Tip: https://v3.xenomai.org/tips/porting-posix/
--- scripts/wrap-link.sh | 6 ++++++ 1 file changed, 6 insertions(+)
scripts/wrap-link.sh +6 -0
@@ -17,6 +17,7 @@ Options: -q be quiet -v be verbose (print each command before running it) -n dry run (print all commands but don't run any) +-h, -help show this help message and exit Example: $1 -v gcc -o foo foo.o -Wl,@/usr/xenomai/lib/cobalt.wrappers -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt
@@ -85,6 +86,11 @@ while test $# -gt 0; do dryrun="echo # " ;; + -h|-help) + usage "$progname" + exit 0 + ;; + -*) cc="$cc $arg" ;;
Signature · 1 line
2.34.1
Quoted 1 line · Haiyang He
Following the porting-posix tip, add support for -h|-help option.
I think the long option should be --help (instead of -help).
Quoted 34 lines
Tip: https://v3.xenomai.org/tips/porting-posix/
Signed-off-by Haiyang He <[email protected]>--- scripts/wrap-link.sh | 6 ++++++ 1 file changed, 6 insertions(+)scripts/wrap-link.sh +6
-0@@ -17,6 +17,7 @@ Options: -q be quiet -v be verbose (print each command before running it) -n dry run (print all commands but don't run any) +-h, -help show this help message and exit Example: $1 -v gcc -o foo foo.o -Wl,@/usr/xenomai/lib/cobalt.wrappers -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt@@ -85,6 +86,11 @@ while test $# -gt 0; do dryrun="echo # " ;; + -h|-help) + usage "$progname" + exit 0 + ;; + -*) cc="$cc $arg" ;;Signature · 1 line
2.34.1
Quoted 5 lines · Florian Bezdeka
Quoted 1 line · Haiyang He
Following the porting-posix tip, add support for -h|-help option.
I think the long option should be --help (instead of -help).
Well, it should usually be --help.
I'm just keeping it consistent with the porting-posix tip webpage. If the content of webpage could change, I prefer to only add -h option.
Haiyang.
Quoted 35 lines
Quoted 34 lines
Tip: https://v3.xenomai.org/tips/porting-posix/
Signed-off-by Haiyang He <[email protected]>--- scripts/wrap-link.sh | 6 ++++++ 1 file changed, 6 insertions(+)scripts/wrap-link.sh +6
-0@@ -17,6 +17,7 @@ Options: -q be quiet -v be verbose (print each command before running it) -n dry run (print all commands but don't run any) +-h, -help show this help message and exit Example: $1 -v gcc -o foo foo.o -Wl,@/usr/xenomai/lib/cobalt.wrappers -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt@@ -85,6 +86,11 @@ while test $# -gt 0; do dryrun="echo # " ;; + -h|-help) + usage "$progname" + exit 0 + ;; + -*) cc="$cc $arg" ;;Signature · 1 line
2.34.1
Quoted 10 lines · Haiyang He
Quoted 5 lines · Florian Bezdeka
Quoted 1 line · Haiyang He
Following the porting-posix tip, add support for -h|-help option.
I think the long option should be --help (instead of -help).
Well, it should usually be --help.
I'm just keeping it consistent with the porting-posix tip webpage. If the content of webpage could change, I prefer to only add -h option.
This is a rendering issue of the webpage: "--" becomes long "-".
I've changed that while merging and will also update the website.
Thanks,
Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center