generate-cmdlist.shon commit bundle: allowing to read from an unseekable fd (e9ee84c)
   1#!/bin/sh
   2
   3echo "/* Automatically generated by $0 */
   4struct cmdname_help {
   5    char name[16];
   6    char help[80];
   7};
   8
   9static struct cmdname_help common_cmds[] = {"
  10
  11sed -n -e 's/^git-\([^  ]*\)[   ].* common.*/\1/p' command-list.txt |
  12sort |
  13while read cmd
  14do
  15     sed -n '
  16     /^NAME/,/git-'"$cmd"'/H
  17     ${
  18            x
  19            s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
  20            p
  21     }' "Documentation/git-$cmd.txt"
  22done
  23echo "};"