-
Notifications
You must be signed in to change notification settings - Fork 0
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
6 changed files
with
144 additions
and
3 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,5 +1,14 @@ | ||
VERS: 2016-02-14 ------- release/0.0.1 | ||
VERS: 2016-02-16 ------- release/0.0.2 | ||
|
||
* 2016-02-16 aa6dfc5 [release] Version bumped to 0.0.2 (vst@vsthost.com) | ||
* 2016-02-16 45112d9 [feature] Added some required R libraries (vst@vsthost.com) | ||
* 2016-02-15 da4a60f [chore] Using a more recent version of pandoc instead of 1.12.etc. (vst@vsthost.com) | ||
* 2016-02-15 481d828 [chore] Added Rprofile, setup and install scripts, default index page (vst@vsthost.com) | ||
* 2016-02-14 a6e10a3 [chore] Development version bumped to 0.0.2-SNAPSHOT (vst@vsthost.com) | ||
|
||
VERS: 2016-02-14 10c6583 release/0.0.1 (vst@vsthost.com) | ||
|
||
* 2016-02-14 7937370 [release] Change log updated (vst@vsthost.com) | ||
* 2016-02-14 9b18bbd [release] Version bumped to 0.0.1 (vst@vsthost.com) | ||
* 2016-02-14 756ebbb [chore] Insignificant Dockerfile changes (vst@vsthost.com) | ||
* 2016-02-14 26c55b4 Initial commit (vst@vsthost.com) |
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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Set-up the default repository: | ||
local({ | ||
r <- getOption("repos") | ||
r["CRAN"] <- "http://cran.r-project.org" | ||
options(repos=r) | ||
}) | ||
|
||
## Provide the start-up function: | ||
.First <- function () { | ||
cat("\n Welcome to R on opencpu-telostat!\n\n") | ||
} | ||
|
||
## Provide the function called prior closing the R session: | ||
.Last <- function () cat("\n Goodbye!\n Telostat Team\n\n") |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
## Get package names: | ||
PACKAGES=${@} | ||
R_MIRROR=${R_MIRROR:-"http://cran.r-project.org"} | ||
|
||
## If no packages exit: | ||
if [ -z "${PACKAGES}" ]; then | ||
echo "No package names specified. Exiting..." | ||
exit 1 | ||
fi | ||
|
||
## Checks if the input is a file path. | ||
function is_file { | ||
echo $1 | grep -qE "tar.gz$" | ||
} | ||
|
||
## Checks if the input is a github repository. | ||
function is_github { | ||
echo $1 | grep -qE ".+/.+" | ||
} | ||
|
||
## Installs a file. | ||
function install_file { | ||
R CMD INSTALL $1 | ||
} | ||
|
||
## Installs a github hosted R package. | ||
function install_github { | ||
r -e "devtools::install_github(\"$1\")" | ||
} | ||
|
||
## Install the R package from CRAN. | ||
function install_cran { | ||
r -e "install.packages(\"$1\", repos=\"${R_MIRROR}\", quiet=TRUE); library($1)" | ||
} | ||
|
||
## Installs the provided package. | ||
function install { | ||
if is_file $1; then | ||
echo "File..." | ||
install_file $1 | ||
elif is_github $1; then | ||
echo "Github..." | ||
install_github $1 | ||
else | ||
echo "CRAN..." | ||
install_cran $1 | ||
fi | ||
} | ||
|
||
## Iterate over packages and install: | ||
for i in ${PACKAGES}; do | ||
echo "Installing $i" | ||
install ${i} && echo "Installed $i" || echo "Not Installed $i" | ||
done |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Populate the .Rprofile | ||
cat /opt/telostat/Rprofile.R > /etc/R/Rprofile.site | ||
|
||
## Install required packages: | ||
/opt/telostat/bin/install.sh vst/sepl rmarkdown dplyr lubridate ggplot2 zoo xts data.table httr | ||
|
||
## Copy the web stuff: | ||
cp -R /opt/telostat/www/* /var/www/html/ |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
background-color: rgb(45, 163, 199); | ||
} | ||
.aligner { | ||
height:100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.aligner-item { | ||
text-align: center; | ||
font-family: Helvetica, Arial, sans-serif; | ||
background-color: rgb(14, 35, 42); | ||
padding: 20px 40px; | ||
color: #ccc; | ||
border-radius: 8px; | ||
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8); | ||
font-size: 1.4em; | ||
} | ||
a { | ||
text-decoration: none; | ||
font-size: 1.9em; | ||
font-weight: bold; | ||
color: #ccc; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="aligner"> | ||
<div class="aligner-item"> | ||
<p> | ||
<a href="http://www.telostat.com">Telostat Pte Ltd</a> | ||
</p> | ||
<p> | ||
Welcome to the OpenCPU Box. | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |