1997-04-02 03:18:28 +08:00
|
|
|
#! /bin/sh
|
|
|
|
# demo-inst.test - try installing from the ../demo subdirectory
|
|
|
|
|
|
|
|
# Test script header.
|
|
|
|
need_prefix=yes
|
|
|
|
if test -z "$srcdir"; then
|
1997-04-02 03:19:30 +08:00
|
|
|
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
|
|
|
|
test "$srcdir" = "$0" && srcdir=.
|
1997-04-02 03:18:28 +08:00
|
|
|
test "${VERBOSE+set}" != "set" && VERBOSE=yes
|
|
|
|
fi
|
|
|
|
. $srcdir/defs || exit 1
|
|
|
|
|
|
|
|
# Check that things are built.
|
|
|
|
if test -f ../demo/hell; then :
|
|
|
|
else
|
|
|
|
echo "You must run demo-make.test before $0" 1>&2
|
1999-03-20 01:58:53 +08:00
|
|
|
exit 77
|
1997-04-02 03:18:28 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Change to our build directory.
|
|
|
|
cd ../demo || exit 1
|
|
|
|
|
1997-04-02 03:21:43 +08:00
|
|
|
echo "= Running $make install in ../demo"
|
|
|
|
$make install || exit 1
|
1997-04-02 03:18:28 +08:00
|
|
|
|
|
|
|
echo "= Executing installed programs"
|
1997-06-20 12:20:39 +08:00
|
|
|
status=0
|
1999-02-12 07:48:25 +08:00
|
|
|
if $prefix/bin/hell.static | grep 'Welcome to GNU Hell'; then :
|
1997-04-02 03:18:28 +08:00
|
|
|
else
|
1999-02-12 07:48:25 +08:00
|
|
|
echo "$0: cannot execute $prefix/bin/hell.static" 1>&2
|
1997-06-20 12:20:39 +08:00
|
|
|
status=1
|
1997-04-02 03:18:28 +08:00
|
|
|
fi
|
|
|
|
|
1997-04-02 03:53:01 +08:00
|
|
|
if $prefix/bin/hell | grep 'Welcome to GNU Hell'; then :
|
1997-04-02 03:18:28 +08:00
|
|
|
else
|
|
|
|
echo "$0: cannot execute $prefix/bin/hell" 1>&2
|
|
|
|
|
|
|
|
# Simple check to see if they are superuser.
|
|
|
|
if test -w /; then :
|
|
|
|
else
|
|
|
|
echo "You may need to run $0 as the superuser."
|
|
|
|
fi
|
1997-06-20 12:20:39 +08:00
|
|
|
status=1
|
1997-04-02 03:18:28 +08:00
|
|
|
fi
|
1997-07-13 05:39:00 +08:00
|
|
|
|
1997-07-22 01:31:05 +08:00
|
|
|
if $prefix/bin/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then :
|
1997-07-13 05:39:00 +08:00
|
|
|
else
|
|
|
|
echo "$0: cannot execute $prefix/bin/helldl" 1>&2
|
|
|
|
|
|
|
|
# Simple check to see if they are superuser.
|
|
|
|
if test -w /; then :
|
|
|
|
else
|
|
|
|
echo "You may need to run $0 as the superuser."
|
|
|
|
fi
|
|
|
|
status=1
|
|
|
|
fi
|
|
|
|
|
1997-06-20 12:20:39 +08:00
|
|
|
exit $status
|