mirror of
https://github.com/git/git.git
synced 2024-12-18 14:24:11 +08:00
21 lines
299 B
Bash
21 lines
299 B
Bash
|
#!/bin/sh
|
||
|
#
|
||
|
# Usage: ./generate-hooklist.sh >hook-list.h
|
||
|
|
||
|
cat <<EOF
|
||
|
/* Automatically generated by generate-hooklist.sh */
|
||
|
|
||
|
static const char *hook_name_list[] = {
|
||
|
EOF
|
||
|
|
||
|
sed -n \
|
||
|
-e '/^~~~~*$/ {x; s/^.*$/ "&",/; p;}' \
|
||
|
-e 'x' \
|
||
|
<Documentation/githooks.txt |
|
||
|
LC_ALL=C sort
|
||
|
|
||
|
cat <<EOF
|
||
|
NULL,
|
||
|
};
|
||
|
EOF
|