kvm tools, setup: Create private directory
[linux-2.6/next.git] / tools / kvm / util / generate-cmdlist.sh
blobfe0178e2507ffcfe48a2a0da0b0939bec1e1f23c
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 's/^kvm-\([^ \t]*\).*common/\1/p' command-list.txt |
13 while read cmd
15 # TODO following sed command should be fixed
16 sed -n '/^NAME/,/^kvm-'"$cmd"'/ {
17 /NAME/d
18 /--/d
19 s/.*kvm-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
21 }' "Documentation/kvm-$cmd.txt"
22 done
23 echo "};"