]> git.ipfire.org Git - thirdparty/git.git/blobdiff - generate-cmdlist.sh
grep tests: move binary pattern tests into their own file
[thirdparty/git.git] / generate-cmdlist.sh
index 709d67405bba65f0b1d5468fe58a92fa41c30398..71158f7d8ba9c774ca6790ea8594e96accb17fce 100755 (executable)
@@ -6,7 +6,7 @@ die () {
 }
 
 command_list () {
-       grep -v '^#' "$1"
+       eval "grep -ve '^#' $exclude_programs" <"$1"
 }
 
 get_categories () {
@@ -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;