Skip to content

Commit 6db1060

Browse files
committed
auto switch dir_private laptop vs server #29
1 parent 3e249cf commit 6db1060

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

hex_density/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
app_cache

hex_density/global.R

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ if (!require("librarian")){
2222
# remotes::install_github("r-lib/ellipsis", ref="main")
2323

2424
librarian::shelf(
25-
bslib, dplyr, httr2, qfes/rdeck, sf, shinyWidgets, tidyselect, viridis)
25+
bslib, dplyr, glue, httr2, qfes/rdeck, sf, shinyWidgets, tidyselect, viridis)
2626

27-
mb_token_txt <- "/Users/bbest/My Drive/private/mapbox_token_bdbest.txt"
27+
dir_private <- switch(
28+
Sys.info()[["sysname"]],
29+
"Darwin" = "/Users/bbest/My Drive/private",
30+
"Linux" = "/share/private")
31+
32+
mb_token_txt <- glue("{dir_private}/mapbox_token_bdbest.txt")
2833
stopifnot(file.exists(mb_token_txt))
34+
2935
mb_token <- readLines(mb_token_txt)
3036
options(rdeck.mapbox_access_token = mb_token)
3137
# rdeck::mapbox_access_token()

0 commit comments

Comments
 (0)