You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
299 B

#!/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