diff --git a/r/tools/update-checksums.R b/r/tools/update-checksums.R index 2aa9df317166f..8b9f1e6959cfd 100644 --- a/r/tools/update-checksums.R +++ b/r/tools/update-checksums.R @@ -38,6 +38,7 @@ if (!file.exists(tasks_yml)) { stop("Run this script from the r/ directory of the arrow repo") } +cat("Extracting libarrow binary paths from tasks.yml\n") # Get the libarrow binary paths from the tasks.yml file binary_paths <- readLines(tasks_yml) |> grep("r-lib__libarrow", x = _, value = TRUE) |> @@ -53,15 +54,19 @@ for (path in binary_paths) { sha_path <- paste0(path, ".sha512") file <- file.path("tools/checksums", sha_path) dirname(file) |> dir.create(path = _, recursive = TRUE, showWarnings = FALSE) - + + cat(paste0("Downloading ", sha_path, "\n")) url <- sprintf(artifactory_root, VERSION, sha_path) download.file(url, file, quiet = TRUE, cacheOK = FALSE) 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", "s/\\\\r//", file)) if (sed_status != 0) { stop("Failed to remove \\r from windows checksum file. Exit code: ", sed_status) } } } + +cat("Checksums updated successfully!\n")