]> git.ipfire.org Git - thirdparty/git.git/blobdiff - generate-cmdlist.sh
Merge branch 'jt/t5500-unflake'
[thirdparty/git.git] / generate-cmdlist.sh
index 8d6d8b45ceb0138797eb7e54b15f7546925598ed..45fecf8bdfb21abea3c8935ba926ab819773509e 100755 (executable)
@@ -6,7 +6,7 @@ die () {
 }
 
 command_list () {
-       grep -v '^#' "$1"
+       eval "grep -ve '^#' $exclude_programs" <"$1"
 }
 
 get_categories () {
@@ -76,6 +76,14 @@ print_command_list () {
        echo "};"
 }
 
+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;