xref: /freebsd/contrib/ntp/scripts/build/check--help (revision 2b15cb3d0922bd70ea592f0da9b4a5b167f4d53f)
1*2b15cb3dSCy Schubert#! /bin/sh
2*2b15cb3dSCy Schubert
3*2b15cb3dSCy Schubert# Look at the file specified in $1 to see if it contains 'no --help'.
4*2b15cb3dSCy Schubert# If it does:
5*2b15cb3dSCy Schubert# - Squawk
6*2b15cb3dSCy Schubert# - rename the file to ($1)-
7*2b15cb3dSCy Schubert# - exit with a non-zero status.
8*2b15cb3dSCy Schubert# otherwise:
9*2b15cb3dSCy Schubert# - exit with a 0 status.
10*2b15cb3dSCy Schubert
11*2b15cb3dSCy Schubertif test ! -f $1
12*2b15cb3dSCy Schubertthen
13*2b15cb3dSCy Schubert	echo "$0: $1 is not a regular file!" 2>&3
14*2b15cb3dSCy Schubert	exit 1
15*2b15cb3dSCy Schubertfi
16*2b15cb3dSCy Schubert
17*2b15cb3dSCy Schubertif grep -q 'no --help' $1
18*2b15cb3dSCy Schubertthen
19*2b15cb3dSCy Schubert	echo "$0: $1 contains 'no --help'!" 2>&3
20*2b15cb3dSCy Schubert	mv ${1} ${1}-
21*2b15cb3dSCy Schubert	exit 1
22*2b15cb3dSCy Schubertfi
23