File: check--help

package info (click to toggle)
ntp 1%3A4.2.8p15%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 32,776 kB
  • sloc: ansic: 242,968; sh: 6,859; makefile: 3,419; perl: 2,765; yacc: 1,524; python: 1,486; ruby: 817; awk: 417; sed: 47; asm: 37
file content (22 lines) | stat: -rwxr-xr-x 384 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh

# Look at the file specified in $1 to see if it contains 'no --help'.
# If it does:
# - Squawk
# - rename the file to ($1)-
# - exit with a non-zero status.
# otherwise:
# - exit with a 0 status.

if test ! -f $1
then
	echo "$0: $1 is not a regular file!" 1>&2
	exit 1
fi

if grep -q 'no --help' $1
then
	echo "$0: $1 contains 'no --help'!" 1>&2
	mv ${1} ${1}-
	exit 1
fi