aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest4
1 files changed, 3 insertions, 1 deletions
diff --git a/test b/test
index 7ccfc8f..242cee3 100755
--- a/test
+++ b/test
@@ -24,7 +24,9 @@ cmd="${1:-unit}"
case "$cmd" in
unit|e2e|all|record|apk) ;;
-h|--help)
- sed -n '2,14p' "$0" >&2
+ # Usage is the header comment block: print from line 2 down to
+ # the first non-comment line.
+ awk 'NR > 1 && /^#/ { sub(/^# ?/, ""); print; next } NR > 1 { exit }' "$0" >&2
exit 0 ;;
*)
echo "usage: $0 [unit|e2e|all|record|apk]" >&2