Skip to content

Commit

Permalink
Small fix to allow for the main architecture to be installed as a sub…
Browse files Browse the repository at this point in the history
… architecture (#117)

* Small fix to allow for the main architecture to be installed as a sub architecture.

* Suggested fix to fix

* Improved fix to fix

* Final fix to fix (?)

---------

Co-authored-by: Dirk Eddelbuettel <edd@debian.org>
  • Loading branch information
BerwinTurlach and eddelbuettel committed Mar 10, 2024
1 parent e94fe55 commit e0f37e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
19 changes: 6 additions & 13 deletions R/init.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,14 @@
packageStartupMessage("The littler package provides 'r' as a binary.")
packageStartupMessage("See 'vignette(\"littler-examples\") for several usage illustrations,")
packageStartupMessage("and see 'vignette(\"littler-faq\") for some basic questions.")
if (Sys.info()[["sysname"]] == "Linux") {
if (unname(Sys.which("r")) == "") { # nocov start
packageStartupMessage("You could link to the 'r' binary installed in\n'",
system.file("bin", "r", package="littler"), "'\n",
if (Sys.info()[["sysname"]] %in% c("Linux", "Darwin")) { # nocov start
if (unname(Sys.which("r")) == "") {
loc <- normalizePath(system.file("bin", .Platform$r_arch, "r", package="littler"))
packageStartupMessage("You could link to the 'r' binary installed in\n'", loc, "'\n",
"from '/usr/local/bin' in order to use 'r' for scripting.",
"See the 'vignette(\"littler-faq\")' for more details.")
if (Sys.info()[["sysname"]] == "Darwin")
packageStartupMessage("On maxOS, 'r' and 'R' are the same so 'lr' is a possible alternate name for littler.")
} # nocov end
}
if (Sys.info()[["sysname"]] == "Darwin") { # nocov start
packageStartupMessage("On OS X, 'r' and 'R' are the same so 'lr' is an alternate name for littler.")
if (unname(Sys.which("lr")) == "") {
packageStartupMessage("You could link to the 'r' binary installed in\n'",
system.file("bin", "r", package="littler"), "'\n",
"as '/usr/local/bin/lr' in order to use 'lr' for scripting.",
"See the 'vignette(\"littler-faq\")' for more details.")
}
} # nocov end
}
2 changes: 1 addition & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $(TGT): $(SRCS)
@mkdir -p ../inst/bin$(R_ARCH)
@cp -a $(TGT) ../inst/bin$(R_ARCH)
@echo "*"
@echo "* new binary $(TGT) installed in bin/ subdirectory"
@echo "* new binary $(TGT) installed in bin$(R_ARCH)/ subdirectory"
@echo "* consider adding a symbolic link from, e.g., /usr/local/bin"
@echo "* on OS X, you may have to name this 'lr' instead"
@echo "* see the littler-faq vignette for more details"
Expand Down

0 comments on commit e0f37e5

Please sign in to comment.