freebsd-ports/lang/modula-3-lib/scripts/check_files
John Polstra d5a92ea924 Split the Modula-3 port into two pieces, creating a new port
"modula-3-lib".  It installs only the shared libraries needed for
executing Modula-3 programs.  This saves a lot of disk space for
people who need to run Modula-3 programs but don't need to build
them.  The original "modula-3" port now depends on this one, and
uses it to install the compiler and the rest of the development
system.

Also, everything is now built with optimization.  I have been
testing this for at least a month, and haven't seen any problems
from it.  It makes the libraries and executables substantially
smaller.

This new port also includes some hooks that will make SOCKS support
possible in the near future.
1996-10-29 23:01:55 +00:00

30 lines
638 B
Bash

#! /bin/sh
#
# check_files listfile m3dir sysdir
#
# The listfile must contain a list of filenames, one per line. It is read,
# and all leading instances of m3dir are replaced with sysdir. If all
# the resulting files exist and are readable, then sysdir is echoed to
# the standard output. Otherwise, nothing is echoed. In any event, the
# exit status is successful.
if [ $# -ne 3 ]; then
echo "Usage: $0 listfile m3dir sysdir" >&2
exit 1
fi
listfile=$1
m3dir=$2
sysdir=$3
result=${sysdir}
for i in $(sed "s,^${m3dir},${sysdir}," ${listfile}); do
if [ ! -r $i ]; then
result=
break
fi
done
echo ${result}
exit 0