xref: /netbsd-src/external/bsd/ntp/dist/scripts/build/check--help (revision 067f568023ec286824b9f682b9091d33868f3adc)
18585484eSchristos#! /bin/sh
28585484eSchristos
38585484eSchristos# Look at the file specified in $1 to see if it contains 'no --help'.
48585484eSchristos# If it does:
58585484eSchristos# - Squawk
68585484eSchristos# - rename the file to ($1)-
78585484eSchristos# - exit with a non-zero status.
88585484eSchristos# otherwise:
98585484eSchristos# - exit with a 0 status.
108585484eSchristos
118585484eSchristosif test ! -f $1
128585484eSchristosthen
13*067f5680Schristos	echo "$0: $1 is not a regular file!" 1>&2
148585484eSchristos	exit 1
158585484eSchristosfi
168585484eSchristos
178585484eSchristosif grep -q 'no --help' $1
188585484eSchristosthen
19*067f5680Schristos	echo "$0: $1 contains 'no --help'!" 1>&2
208585484eSchristos	mv ${1} ${1}-
218585484eSchristos	exit 1
228585484eSchristosfi
23