Created
December 29, 2022 18:53
-
-
Save dpastoor/1d587c48351ef99b7dabf7959b007366 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) | |
# its bionic for both ubuntu 18 and 20 | |
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') | |
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