]> git.ipfire.org Git - thirdparty/git.git/blame - generate-hooklist.sh
Git 2.36.6
[thirdparty/git.git] / generate-hooklist.sh
CommitLineData
cfe853e6
ÆAB
1#!/bin/sh
2#
3# Usage: ./generate-hooklist.sh >hook-list.h
4
5cat <<EOF
6/* Automatically generated by generate-hooklist.sh */
7
8static const char *hook_name_list[] = {
9EOF
10
11sed -n \
12 -e '/^~~~~*$/ {x; s/^.*$/ "&",/; p;}' \
13 -e 'x' \
14 <Documentation/githooks.txt |
15 LC_ALL=C sort
16
17cat <<EOF
18 NULL,
19};
20EOF