1#! /bin/sh 2# pdemo-inst.test - try installing from the ../pdemo 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 ../pdemo/hell$EXEEXT; then : 15else 16 echo "You must run pdemo-make.test before $0" 1>&2 17 exit 77 18fi 19 20# Change to our build directory. 21cd ../pdemo || exit 1 22 23echo "= Running $make install in ../pdemo" 24$make install || exit 1 25 26echo "= Executing installed programs" 27status=0 28if $prefix/bin/hell_static | grep 'Welcome to GNU Hell'; then : 29else 30 echo "$0: cannot execute $prefix/bin/hell_static" 1>&2 31 status=1 32fi 33 34if $prefix/bin/hell | grep 'Welcome to GNU Hell'; then : 35else 36 echo "$0: cannot execute $prefix/bin/hell" 1>&2 37 38 # Simple check to see if they are superuser. 39 if test -w /; then : 40 else 41 echo "You may need to run $0 as the superuser." 42 fi 43 status=1 44fi 45 46if $prefix/bin/helldl | $EGREP -e '(Welcome to .*GNU Hell|unsupported)'; then : 47else 48 echo "$0: cannot execute $prefix/bin/helldl" 1>&2 49 50 # Simple check to see if they are superuser. 51 if test -w /; then : 52 else 53 echo "You may need to run $0 as the superuser." 54 fi 55 status=1 56fi 57 58exit $status 59