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
commit 7e19a25c14
3 changed files with 12 additions and 4 deletions

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`"