fix profile scripts to handle case where R_HOME is already defined

This commit is contained in:
Tom Callaway 2009-03-28 16:42:48 +00:00
parent c8c2d280a8
commit ea5471d7ce
3 changed files with 12 additions and 4 deletions

7
R.csh
View File

@ -1,4 +1,7 @@
# Some R modules are not smart enough to ask R for the value of RHOME
# and instead depend on the R_HOME environment variable.
set RHOME = `R RHOME`
setenv R_HOME $RHOME
# Set R_HOME only if it is not already set.
if ( ${?R_HOME} == 0 ) then
set RHOME = `R RHOME`
setenv R_HOME $RHOME
endif

3
R.sh
View File

@ -1,3 +1,4 @@
# Some R modules are not smart enough to ask R for the value of RHOME
# and instead depend on the R_HOME environment variable.
export R_HOME="`R RHOME`"
# Set R_HOME only if it is not already set.
test "a$R_HOME" = "a" && export R_HOME="`R RHOME`"

6
R.spec
View File

@ -6,7 +6,7 @@
Name: R
Version: 2.8.1
Release: 7%{?dist}
Release: 8%{?dist}
Summary: A language for data analysis and graphics
URL: http://www.r-project.org
Source0: ftp://cran.r-project.org/pub/R/src/base/R-2/R-%{version}.tar.gz
@ -962,6 +962,10 @@ R CMD javareconf \
%postun -n libRmath -p /sbin/ldconfig
%changelog
* Sat Mar 28 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.8.1-8
- fix profile scripts for situation where R_HOME is already defined
(bugzilla 492706)
* Tue Mar 24 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.8.1-7
- bump for new tag