Skip to content

Commit f7bf0b7

Browse files
committed
use 'cp' to copy
1 parent 969cfa6 commit f7bf0b7

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/install.libs.R

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,19 @@
2525
if (is.na(tbbLib)) {
2626

2727
# using bundled TBB
28-
tbbLibs <- list.files(
29-
path = "tbb/build/lib_release",
30-
pattern = shlibPattern,
31-
full.names = TRUE
28+
sysname <- Sys.info()[["sysname"]]
29+
30+
tbbExt <- switch(
31+
sysname,
32+
Windows = ".dll",
33+
Darwin = ".dylib",
34+
".so"
3235
)
3336

34-
# copy tbb libraries
35-
file.copy(tbbLibs, tbbDest)
37+
fmt <- "cp -R tbb/build/lib_release/*%s '%s/'"
38+
cmd <- sprintf(fmt, tbbExt, tbbDest)
39+
40+
system(cmd)
3641

3742
} else {
3843

0 commit comments

Comments
 (0)