standardize repo addition and install

This commit is contained in:
aptalca
2022-01-28 16:38:54 -05:00
parent db595d5fa7
commit 4007f99051
4 changed files with 19 additions and 10 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/with-contenv bash
echo "**** Adding r repo ****"
if ! dpkg -l | grep gnupg > /dev/null; then
apt-get update && apt-get install -y gnupg
fi
if [ ! -f "/etc/apt/sources.list.d/r.list" ]; then
curl -s https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | apt-key add -
source /etc/lsb-release
echo "deb https://cloud.r-project.org/bin/linux/ubuntu ${DISTRIB_CODENAME}-cran40/" > /etc/apt/sources.list.d/r.list
fi