Created
October 14, 2018 14:18
-
-
Save obarisk/62f447cf30274be14bc1b62afd23583f to your computer and use it in GitHub Desktop.
update-shiny-server on ubuntu
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
#!/bin/bash | |
DISTRO="ubuntu" | |
DISTROCODE="14.04" | |
ARCH="x86_64" | |
HOST="https://download3.rstudio.org" | |
ShinyV=$(curl -s https://www.rstudio.com/products/shiny/download-server/ |\ | |
grep 'Download RStudio Shiny Server' |\ | |
sed 's/<[^>]*>//g' |\ | |
sed 's/Download RStudio Shiny Server v//' |\ | |
sed 's/ //g' |\ | |
tr -d '[:space:]') | |
ShinyU="${HOST}/${DISTRO}-${DISTROCODE}/${ARCH}/shiny-server-${ShinyV}-amd64.deb" | |
InstallV=$(apt-cache policy shiny-server |\ | |
grep Installed |\ | |
sed 's/Installed: //g' |\ | |
sed 's/ //g' |\ | |
tr -d '[:space:]') | |
if [ "${ShinyV}" != "${InstallV}" ]; then | |
wget $ShinyU | |
sudo gdebi "shiny-server-${ShinyV}-amd64.deb" | |
rm "shiny-server-${ShinyV}-amd64.deb" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment