Created
February 4, 2021 00:51
-
-
Save curiositycasualty/ac89fb070cd042c88dae7c70839f4b8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#{package_vector}, | |
Ncpus = #{new_resource.ncpus}, | |
repos = c("CRAN" = "#{new_resource.cran_repo}"), | |
clean = #{new_resource.clean.to_s.upcase}, | |
destdir = "#{new_resource.destdir}", | |
keep_outputs = TRUE, | |
method = "wget", | |
extra = " >/dev/null 2>&1 || true; | |
cd #{new_resource.destdir}; | |
__wget() { | |
if echo $1 | grep -qs '.tar.gz'; then | |
wget \ | |
--no-verbose \ | |
--timestamping \ | |
--no-if-modified-since \ | |
$1 || true; | |
else | |
wget $1 $2 $3 $4 $5 $6 $7 $8; | |
fi; | |
}; | |
__wget " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment