Do not increment pool indexes twice
[pohmelfs.git] / tools / perf / util / generate-cmdlist.sh
blobf06f6fd148f8e63b810a7095e403e6630f1ca7f8
1 #!/bin/sh
3 echo "/* Automatically generated by $0 */
4 struct cmdname_help
6 char name[16];
7 char help[80];
8 };
10 static struct cmdname_help common_cmds[] = {"
12 sed -n -e 's/^perf-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
13 sort |
14 while read cmd
16 sed -n '
17 /^NAME/,/perf-'"$cmd"'/H
20 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
22 }' "Documentation/perf-$cmd.txt"
23 done
24 echo "};"