Merge branch 'for-3.17/drivers' of git://git.kernel.dk/linux-block
[deliverable/linux.git] / tools / perf / util / generate-cmdlist.sh
CommitLineData
07800601
IM
1#!/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
1d8c8b20 12sed -n -e 's/^perf-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
07800601
IM
13sort |
14while read cmd
15do
16 sed -n '
1d8c8b20 17 /^NAME/,/perf-'"$cmd"'/H
07800601
IM
18 ${
19 x
1d8c8b20 20 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
07800601 21 p
1d8c8b20 22 }' "Documentation/perf-$cmd.txt"
07800601 23done
393be2e3 24
89fe808a 25echo "#ifdef HAVE_LIBELF_SUPPORT"
393be2e3
NK
26sed -n -e 's/^perf-\([^ ]*\)[ ].* full.*/\1/p' command-list.txt |
27sort |
28while read cmd
29do
30 sed -n '
31 /^NAME/,/perf-'"$cmd"'/H
32 ${
33 x
34 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
35 p
36 }' "Documentation/perf-$cmd.txt"
37done
89fe808a 38echo "#endif /* HAVE_LIBELF_SUPPORT */"
07800601 39echo "};"
This page took 0.285504 seconds and 5 git commands to generate.