Skip to content

Commit

Permalink
make sed portable
Browse files Browse the repository at this point in the history
  • Loading branch information
assignUser committed Dec 9, 2023
1 parent 94891cf commit 626e206
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion r/bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ devtools::install_dev_deps(".", upgrade = "never")
devtools::install_cran("styler")

cli::cli_alert_info("Removing badges from Readme.md")
system2("sed", c("-i", "'/^<!--- badges: start -->$/,/^<!--- badges: stop -->$/d'", "README.md"))
system2("sed", c("-i", "-e", "'/^<!--- badges: start -->$/,/^<!--- badges: stop -->$/d'", "README.md"))

cli::cli_alert_info("Running urlchecker")
url_res <- urlchecker::url_check()
Expand Down
2 changes: 1 addition & 1 deletion r/tools/update-checksums.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ for (path in binary_paths) {
if (grepl("windows", path)) {
cat(paste0("Converting ", path, " to windows style line endings\n"))
# UNIX style line endings cause errors with mysys2 sha512sum
sed_status <- system2("sed", args = c("-i", "s/\\\\r//", file))
sed_status <- system2("sed", args = c("-i", "-e", "s/\\\\r//", file))
if (sed_status != 0) {
stop("Failed to remove \\r from windows checksum file. Exit code: ", sed_status)
}
Expand Down

0 comments on commit 626e206

Please sign in to comment.