Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgenerate-cmdlist.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 2736791561..16043e3847 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -9,7 +9,7 @@ command_list () {
eval "grep -ve '^#' $exclude_programs" <"$1"
}
-get_categories () {
+get_category_line () {
tr ' ' '\012' |
LC_ALL=C sort -u
}
@@ -17,7 +17,8 @@ get_categories () {
category_list () {
command_list "$1" |
cut -c 40- |
- get_categories |
+ tr ' ' '\012' |
+ LC_ALL=C sort -u |
grep -v '^$'
}
@@ -66,7 +67,7 @@ print_command_list () {
while read cmd rest
do
printf " { \"$cmd\", $(get_synopsis $cmd), 0"
- for cat in $(echo "$rest" | get_categories)
+ for cat in $(echo "$rest" | get_category_line)
do
printf " | CAT_$cat"
done