]> git.ipfire.org Git - thirdparty/git.git/blobdiff - generate-cmdlist.sh
Merge branch 'jk/escaped-wildcard-dwim'
[thirdparty/git.git] / generate-cmdlist.sh
index fa1e5475e87c746ec0d74f5b1606264d9a3a76dc..71158f7d8ba9c774ca6790ea8594e96accb17fce 100755 (executable)
@@ -6,7 +6,7 @@ die () {
 }
 
 command_list () {
-       grep -v '^#' "$1"
+       eval "grep -ve '^#' $exclude_programs" <"$1"
 }
 
 get_categories () {
@@ -80,7 +80,7 @@ print_config_list () {
        cat <<EOF
 static const char *config_name_list[] = {
 EOF
-       grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt |
+       grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt |
        sed '/deprecated/d; s/::$//; s/,  */\n/g' |
        sort |
        while read line
@@ -93,6 +93,14 @@ EOF
 EOF
 }
 
+exclude_programs=
+while test "--exclude-program" = "$1"
+do
+       shift
+       exclude_programs="$exclude_programs -e \"^$1 \""
+       shift
+done
+
 echo "/* Automatically generated by generate-cmdlist.sh */
 struct cmdname_help {
        const char *name;