Rev 11368 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#! /bin/sh## ${R_HOME}/bin/REMOVE for removing add-on packagesrevision='$Revision: 1.9.2.1 $'version=`set - ${revision}; echo ${2}`version="R add-on package remover ${version}Copyright (C) 2000 The R Core Development Team.This is free software; see the GNU General Public Licence version 2or later for copying conditions. There is NO warranty."usage="Usage: R CMD REMOVE [options] pkgsRemove the add-on packages specified by pkgs from the default librarytree (${R_HOME}/library) or the tree specified via \`--library'.Options:-h, --help print short help message and exit-v, --version print version info and exit-l, --library=LIB remove packages from library tree LIBReport bugs to <r-bugs@r-project.org>."pkgs=lib=${R_HOME}/librarywhile test -n "${1}"; docase ${1} in-h|--help)echo "${usage}"; exit 0 ;;-v|--version)echo "${version}"; exit 0 ;;-l)lib=${2}; shift ;;--library=*)lib=`echo "${1}" | sed -e 's/[^=]*=//'` ;;*)pkgs="${pkgs} ${1}" ;;esacshiftdoneif test -z "${pkgs}"; thenecho "ERROR: no packages specified"exit 1fiif test -d ${lib} -a -w ${lib}; thencd ${lib}lib=`pwd`elseecho "ERROR: cannot cd to or remove from directory \`${lib}'"exit 2fifor pkg in ${pkgs}; doif test -d ${pkg}; thenrm -rf ${pkg}elseecho "WARNING: there is no pkg \`${pkg}' in lib \`${lib}'"continuefidonecat */TITLE > LibIndex 2> /dev/nullNO_PERL5=@NO_PERL5@if ${NO_PERL5}; thenecho "*** Cannot update the file"echo "*** ${lib}/index.html"echo "*** without Perl version 5. Please delete the entries for"echo "*** the packages you removed manually."exit 2fiif test ${lib} = ${R_HOME}/library; then${R_HOME}/bin/build-help --htmllistscat ${R_HOME}/library/*/CONTENTS > ${R_HOME}/doc/html/search/index.txtfi### Local Variables: ***### mode: sh ***### sh-indentation: 2 ***### End: ***