#! /bin/sh URHOME="${HOME}/.R" PKGLIST="${URHOME}/doc/html/packages.html" rm -rf ${URHOME} dirs="${URHOME} ${URHOME}/doc ${URHOME}/doc/html ${URHOME}/library" for d in ${dirs}; do mkdir -p ${d} done for f in ${RHOME}/doc/html/*; do ln -s ${f} ${URHOME}/doc/html done rm -f ${PKGLIST} cp ${RHOME}/doc/html/packages-head.html ${PKGLIST} for lib in $*; do echo "

Packages in ${lib}

" >> ${PKGLIST} echo "

" >> ${PKGLIST} for pkg in `ls -d ${lib}/* | sed '/CVS$/d; /profile$/d'`; do if test -d ${pkg}; then rm -f ${URHOME}/library/${pkg} ln -s ${pkg} ${URHOME}/library pkgname=`basename ${pkg}` if test -r ${pkg}/TITLE; then pkgtitle=`cat ${pkg}/TITLE | sed "s/^${pkgname}//"` else pkgtitle="" fi echo "" \ >> ${PKGLIST} fi done echo "
${pkgname}${pkgtitle}
" >> ${PKGLIST} echo "" >> ${PKGLIST} done cat ${RHOME}/doc/html/packages-foot.html >> ${PKGLIST}