-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcheck-run1
executable file
·44 lines (44 loc) · 919 Bytes
/
check-run1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
#
# check-run1 -- Shell script to test ipgen basic functionality
#
# Author: Roy Hills
# Date: 9 March 2006
#
# This shell script checks that "ipgen --help" and "ipgen --version"
# work. These options don't use much of the ipgen functionality, so if
# they fail, then there is a fundamental problem with the program.
#
TMPFILE=/tmp/ipgen-test.$$.tmp
#
echo "Checking ipgen --help ..."
./ipgen --help 2> $TMPFILE
if test $? -ne 0; then
rm -f $TMPFILE
echo "FAILED"
exit 1
fi
grep '^Report bugs or send suggestions at ' $TMPFILE >/dev/null
if test $? -ne 0; then
rm -f $TMPFILE
echo "FAILED"
exit 1
fi
echo "ok"
#
echo "Checking ipgen --version ..."
./ipgen --version 2> $TMPFILE
if test $? -ne 0; then
rm -f $TMPFILE
echo "FAILED"
exit 1
fi
grep '^Copyright (C) ' $TMPFILE >/dev/null
if test $? -ne 0; then
rm -f $TMPFILE
echo "FAILED"
exit 1
fi
echo "ok"
#
rm -f $TMPFILE