Build the next version of R as well

This commit is contained in:
Gábor Csárdi 2022-03-30 15:26:12 +02:00
commit 04a2ff4fc3

View file

@ -46,11 +46,15 @@ fetch_r_source() {
elif [ "${1}" = devel ]; then
# Download the daily tarball of R devel
wget -q https://stat.ethz.ch/R/daily/R-devel.tar.gz -O /tmp/R-devel.tar.gz
elif [ "${1}" = "next" ]; then
wget -q https://cran.r-project.org/src/base-prerelease/R-latest.tar.gz -O /tmp/R-next.tar.gz
else
wget -q "${CRAN}/src/base/R-`echo ${1}| awk 'BEGIN {FS="."} {print $1}'`/R-${1}.tar.gz" -O /tmp/R-${1}.tar.gz
fi
echo "Extracting R-${1}"
tar xf /tmp/R-${1}.tar.gz -C /tmp
dirname=`tar tzvf /tmp/R-next.tar.gz | head -1 | awk '{ print $NF }' | cut -d/ -f1`
mv /tmp/${dirname} /tmp/R-${1}
rm /tmp/R-${1}.tar.gz
}