blob: f06f6fd148f8e63b810a7095e403e6630f1ca7f8 [file] [log] [blame]
Ingo Molnar07800602009-04-20 15:00:56 +02001#!/bin/sh
2
3echo "/* Automatically generated by $0 */
4struct cmdname_help
5{
6 char name[16];
7 char help[80];
8};
9
10static struct cmdname_help common_cmds[] = {"
11
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020012sed -n -e 's/^perf-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
Ingo Molnar07800602009-04-20 15:00:56 +020013sort |
14while read cmd
15do
16 sed -n '
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020017 /^NAME/,/perf-'"$cmd"'/H
Ingo Molnar07800602009-04-20 15:00:56 +020018 ${
19 x
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020020 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
Ingo Molnar07800602009-04-20 15:00:56 +020021 p
Ingo Molnar1d8c8b22009-04-20 15:52:29 +020022 }' "Documentation/perf-$cmd.txt"
Ingo Molnar07800602009-04-20 15:00:56 +020023done
24echo "};"