# $Id$ if [ -z "$PKG_INSTALL_ROOT" -o "$PKG_INSTALL_ROOT" = "/" ]; then PARAM="" else PARAM="-R $PKG_INSTALL_ROOT" fi # find the most recent R package CR=`pkginfo -x $PARAM 'LNFr.*' 2>/dev/null | \ awk '{ PKG=$1; getline; split($2,VER,"\."); X=(VER[1]*10000)+(VER[2]*100)+VER[3]; print PKG, X }' | \ sort -k2n | tail -1 | cut -f1 -d\ ` if [ -n "$CR" ]; then VER=`pkgparam $PARAM $CR VERSION` DIR=`pkgparam $PARAM $CR BASEDIR` echo "R_DIR=$DIR/R-$VER" >>$1 else echo "No installed LNFr instance found." exit 3 fi