Created
December 3, 2022 19:53
-
-
Save dpastoor/7d22d429d50811717bc1ef4e5f9c603c to your computer and use it in GitHub Desktop.
update-workbench-daily
This file contains hidden or 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
#!/bin/bash | |
set -ex | |
DEBIAN_FRONTEND=noninteractive | |
rstudio-server stop | |
rstudio-launcher stop | |
JSON=$(curl -s https://dailies.rstudio.com/rstudio/latest/index.json) | |
DIST_JSON=$(echo "${JSON}" | jq .products.workbench.platforms['"'"bionic-amd64"'"']) | |
LATEST_URL=$(echo "${DIST_JSON}" | jq -r '.link') | |
FILENAME=$(echo "${DIST_JSON}" | jq -r '.filename') | |
# its bionic for both ubuntu 18 and 20 | |
curl -o /tmp/${FILENAME} ${LATEST_URL} | |
gdebi --non-interactive /tmp/${FILENAME} | |
rm /tmp/${FILENAME} | |
systemctl start rstudio-launcher | |
systemctl start rstudio-server | |
systemctl enable rstudio-launcher | |
systemctl enable rstudio-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment