blob: 07cff69d8e5c5fdbca47b603dbc2e9c067d369fd [file] [log] [blame]
Junio C Hamanoc74390e2006-11-05 11:26:21 -08001#!/bin/sh
2
3{
4 cat <<\EOF
5sayIt:
6 $(foreach b,$(BUILT_INS),echo XXX $b YYY;)
7EOF
8 cat Makefile
9} |
10make -f - sayIt 2>/dev/null |
11sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' |
12sort |
13{
14 bad=0
15 while read builtin
16 do
Elia Pintob09d8552014-03-25 10:22:22 -070017 base=$(expr "$builtin" : 'git-\(.*\)')
18 x=$(sed -ne 's/.*{ "'$base'", \(cmd_[^, ]*\).*/'$base' \1/p' git.c)
Junio C Hamanoc74390e2006-11-05 11:26:21 -080019 if test -z "$x"
20 then
21 echo "$base is builtin but not listed in git.c command list"
22 bad=1
23 fi
24 for sfx in sh perl py
25 do
26 if test -f "$builtin.$sfx"
27 then
28 echo "$base is builtin but $builtin.$sfx still exists"
29 bad=1
30 fi
31 done
32 done
33 exit $bad
34}