Blame | Last modification | View Log | Download | RSS feed
#! /bin/sh# ${RHOME}/bin/REMOVE for removing add-on packages# Usage:# R REMOVE [options] [-l lib] pkg_1 ... pkg_nVERSION="0.1-0"USAGE_MSG="Usage: R REMOVE [options] [-l lib] pkg_1 ... pkg_n"lib=${RHOME}/librarycase ${1} in-h|--help|-\?)echo "${USAGE_MSG}"; exit 0 ;;-V|--version)echo "${VERSION}"; exit 0 ;;-l)lib=${2}; shift 2 ;;esacif test ${#} -eq 0; thenecho "${USAGE_MSG}"exit 1fiif test -d ${lib} -a -w ${lib}; thencd ${lib}lib=`pwd`elseecho "ERROR: cannot cd to or remove from directory \`${lib}'"exit 1fifor pkg in $*; 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 2fi${RHOME}/bin/build-help --htmllists