-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
cat("##### PSA ##### \n | ||
You are about to run remote code! It is always a good idea to review remote code \ | ||
before running, as a malicious actor could use a script like this to do naughty \ | ||
things on your computer.\n \ | ||
In this case, we are going to install the senamhiR package, and a couple of \ | ||
packages that we need to install it.\n\n") | ||
You are about to run remote code! It is always a good idea to review remote \ | ||
code before running, as a malicious actor could use a script like this to do \ | ||
naughty things on your computer.\n \ | ||
In this case, we are going to install the remotes package and use it to install\ | ||
senamhiR.\n\n") | ||
|
||
proceed <- readline(prompt = "Would you like to proceed? (y/N)") | ||
|
||
if (proceed == "Y" || proceed == "y") { | ||
if (!any(c("devtools", "remotes") %in% rownames(installed.packages()))) { | ||
install.packages("devtools") | ||
} | ||
if("devtools" %in% rownames(installed.packages()) == TRUE) { | ||
devtools::install_gitlab("ConorIA/senamhiR") | ||
} else { | ||
remotes::install_gitlab("ConorIA/senamhiR") | ||
} | ||
if (readline("Would you like to proceed? (y/N)") %in% c("Y", "y")) { | ||
source("https://install-github.me/r-lib/remotes") | ||
remotes::install_gitlab("ConorIA/senamhiR") | ||
} else { | ||
stop("Review the remote code and try again.") | ||
} |