1#! /bin/sh
2# depdemo-inst.test - try installing from the ../depdemo subdirectory
3
4# Test script header.
5need_prefix=yes
6if test -z "$srcdir"; then
7  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
8  test "$srcdir" = "$0" && srcdir=.
9  test "${VERBOSE+set}" != "set" && VERBOSE=yes
10fi
11. $srcdir/defs || exit 1
12
13# Check that things are built.
14if test -f ../depdemo/depdemo$EXEEXT; then :
15else
16  echo "You must run depdemo-make.test before $0" 1>&2
17  exit 77
18fi
19
20# Change to our build directory.
21cd ../depdemo || exit 1
22
23echo "= Running $make install in ../depdemo"
24$make install || exit 1
25
26echo "= Executing installed programs"
27
28status=0
29if $prefix/bin/depdemo_static; then :
30else
31  echo "$0: cannot execute $prefix/bin/depdemo_static" 1>&2
32  status=1
33fi
34
35if $prefix/bin/depdemo; then :
36else
37  echo "$0: cannot execute $prefix/bin/depdemo" 1>&2
38
39  # Simple check to see if they are superuser.
40  if test -w /; then :
41  else
42    echo "You may need to run $0 as the superuser."
43  fi
44  status=1
45fi
46
47exit $status
48