Debian Codegraph @

check-run1

raw
1 #!/bin/sh
2 # The IKE Scanner (ike-scan) is Copyright (C) 2003-2007 Roy Hills,
3 # NTA Monitor Ltd.
4 #
5 # This file is part of ike-scan.
6 #
7 # ike-scan is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # ike-scan is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with ike-scan. If not, see <http://www.gnu.org/licenses/>.
19 #
20 # check-run1 -- Shell script to test ike-scan --help and --version
21 #
22 # Author: Roy Hills
23 # Date: 12 January 2004
24 #
25 # This shell script checks that "ike-scan --help" and "ike-scan --version"
26 # work. These options don't use much of the ike-scan functionallity, so if
27 # they fail, then there is a fundimental problem with the program.
28 #
29 TMPFILE=/tmp/ike-scan-test.$$.tmp
30 #
31 echo "Checking ike-scan --help ..."
32 $srcdir/ike-scan --help 2> $TMPFILE
33 if test $? -ne 0; then
34 rm -f $TMPFILE
35 echo "FAILED"
36 exit 1
37 fi
38 grep '^See the ike-scan homepage at ' $TMPFILE >/dev/null
39 if test $? -ne 0; then
40 rm -f $TMPFILE
41 echo "FAILED"
42 exit 1
43 fi
44 echo "ok"
45 #
46 echo "Checking ike-scan --version ..."
47 $srcdir/ike-scan --version 2> $TMPFILE
48 if test $? -ne 0; then
49 rm -f $TMPFILE
50 echo "FAILED"
51 exit 1
52 fi
53 grep '^ike-scan comes with NO WARRANTY ' $TMPFILE >/dev/null
54 if test $? -ne 0; then
55 rm -f $TMPFILE
56 echo "FAILED"
57 exit 1
58 fi
59 echo "ok"
60 #
61 rm -f $TMPFILE