#! /bin/sh
# ${RHOME}/src/library/LIBSETUP

RHOME=${RHOME:-`cd ../..; pwd`}
export RHOME

# Set up packages (by default, all but `base' and `profile')
PKGS=`ls|sed '
/CVS/d
/LIBCLEAN/d
/LIBSETUP/d
/Makefile/d
/base/d
/profile/d
'`

# Install packages without documentation if no R source code for
# package is installed
for pkg in ${PKGS}; do
    if test ! -f ${RHOME}/library/${pkg}/R/${pkg}; then
	sh ${RHOME}/etc/INSTALL --no-docs ${pkg}
    fi
done


