Rev 11368 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#! /bin/shUSER_R_HOME="${HOME}/.R"PKGLIST="${USER_R_HOME}/doc/html/packages.html"SEARCHINDEX="${USER_R_HOME}/doc/html/search/index.txt"rm -rf ${USER_R_HOME}dirs="${USER_R_HOME} ${USER_R_HOME}/doc ${USER_R_HOME}/doc/html ${USER_R_HOME}/doc/html/search ${USER_R_HOME}/library"for d in ${dirs}; domkdir -p ${d}donefor f in AUTHORS COPYING THANKS; doif test -f ${R_HOME}/${f}; thenln -s ${R_HOME}/${f} ${USER_R_HOME}/${f}fidoneif test -d ${R_HOME}/doc/manual; thenln -s ${R_HOME}/doc/manual ${USER_R_HOME}/doc/manualfifor f in ${R_HOME}/doc/html/*; doif test -f $f; thenln -s ${f} ${USER_R_HOME}/doc/htmlfidonefor f in ${R_HOME}/doc/html/search/*; doif test -f $f; thenln -s ${f} ${USER_R_HOME}/doc/html/searchfidonerm -f ${PKGLIST}rm -f ${SEARCHINDEX}cp ${R_HOME}/doc/html/packages-head.html ${PKGLIST}get_unique () {if test -r ${1}; thenx="1"while test -r ${1}.${x}; dox=`echo "$x+1" | bc`doneecho ${1}.${x}elseecho $1fi}for lib in $*; doecho "<P><h3>Packages in ${lib}</h3>" >> ${PKGLIST}echo "<P><TABLE width=100%>" >> ${PKGLIST}if test -d ${lib}; thenfor pkg in `ls -d ${lib}/* | sed '/CVS$/d; /profile$/d'`; doif test -d ${pkg}; thenpkgname=`basename ${pkg}`target=`get_unique ${USER_R_HOME}/library/${pkgname}`targetname=`basename ${target}`ln -s ${pkg} ${target}if test -r ${pkg}/TITLE; thenpkgtitle=`cat ${pkg}/TITLE | sed "s/^${pkgname}//"`elsepkgtitle=""fiecho "<TR ALIGN=LEFT VALIGN=TOP><TD width=25%><A HREF=\"../../library/${targetname}/html/00Index.html\">${pkgname}</A><TD>${pkgtitle}</TD></TR>" \>> ${PKGLIST}cat ${pkg}/CONTENTS | \sed "s/\/library\/${pkgname}\//\/library\/${targetname}\//;" \>> ${SEARCHINDEX}fidonefiecho "</TABLE>" >> ${PKGLIST}echo "" >> ${PKGLIST}donecat ${R_HOME}/doc/html/packages-foot.html >> ${PKGLIST}ln -s ${R_HOME}/doc/html/R.css ${USER_R_HOME}/library### Local Variables: ***### mode: sh ***### sh-indentation: 2 ***### End: ***