Skip to content

Commit 055aad4

Browse files
committed
Merge branch 'release'
2 parents b8197b9 + 8c592fa commit 055aad4

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Description: The goal of checkpoint is to solve the problem of package
1616
Immediately after completion of the rsync mirror process, we take a
1717
snapshot, thus creating the archive. Snapshot archives exist starting from
1818
2014-09-17.
19-
Version: 0.3.5
20-
Date: 2015-01-22
19+
Version: 0.3.6
20+
Date: 2015-01-27
2121
Author: Revolution Analytics
2222
Maintainer: Andrie de Vries <[email protected]>
2323
Copyright: Revolution Analytics
2424
License: GPL-2
25-
URL: https://github.com/RevolutionAnalytics/checkpoint
25+
URL: http://projects.revolutionanalytics.com/documents/rrt/rrtpkgs/
2626
BugReports: http://www.github.com/RevolutionAnalytics/checkpoint/issues
2727
Depends:
2828
R(>= 3.1.1)

R/checkpoint.R

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,29 @@ checkpoint <- function(snapshotDate, project = getwd(), verbose=TRUE, use.knitr
7979

8080
if(length(packages.to.install) > 0) {
8181
mssg(verbose, "Installing packages used in this project ")
82-
suppressWarnings(
83-
utils::install.packages(pkgs = packages.to.install, verbose = FALSE, quiet = TRUE)
84-
)
82+
for(pkg in packages.to.install){
83+
if(pkg %in% unname(installed.packages()[, "Package"])) {
84+
mssg(verbose, " - Previously installed ", sQuote(pkg))
85+
} else {
86+
mssg(verbose, " - Installing ", sQuote(pkg))
87+
suppressWarnings(
88+
utils::install.packages(pkgs = pkg, verbose = FALSE, quiet = TRUE)
89+
)
90+
}
91+
}
8592
} else if(length(packages.detected > 0)){
8693
mssg(verbose, "All detected packages already installed")
8794
} else {
8895
mssg(verbose, "No packages found to install")
8996
}
90-
97+
9198
# Reload detached packages
9299
if(length(packages.in.search > 0)){
93100
lapply(packages.in.search, library, character.only = TRUE, quietly = TRUE)
94101
}
95102

103+
mssg(verbose, "checkpoint process complete")
104+
mssg(verbose, "---")
96105
invisible(NULL)}
97106

98107
setMranMirror <- function(snapshotDate, snapshotUrl = checkpoint:::getSnapShotUrl(snapshotDate)){

0 commit comments

Comments
 (0)