Skip to content

Commit

Permalink
more echos
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Aug 10, 2023
1 parent 8736b99 commit 30dc48c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/rstudio-server/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,25 @@ check_r() {
install_rstudio() {
local version=$1
local deb_file="rstudio-server.deb"
local install_url
local architecture
architecture="$(dpkg --print-architecture)"

mkdir -p /tmp/rstudio-server
pushd /tmp/rstudio-server

if [[ "${version}" == "stable" ]] || [[ "${version}" == "preview" ]] || [[ "${version}" == "daily" ]]; then
curl -sLo "${deb_file}" "https://rstudio.org/download/latest/${version}/server/${UBUNTU_CODENAME}/rstudio-server-latest-${architecture}.deb"
install_url="https://rstudio.org/download/latest/${version}/server/${UBUNTU_CODENAME}/rstudio-server-latest-${architecture}.deb"
echo "Download from ${install_url}"
curl -sLo "${deb_file}" "${install_url}" ||
echo "(!) Version ${version} for ${UBUNTU_CODENAME} ${architecture} is not found" && exit 1
else
curl -sLo "${deb_file}" "https://download2.rstudio.org/server/${UBUNTU_CODENAME}/${architecture}/rstudio-server-${RS_VERSION/"+"/"-"}-${architecture}.deb" ||
curl -sLo "${deb_file}" "https://s3.amazonaws.com/rstudio-ide-build/server/${UBUNTU_CODENAME}/${architecture}/rstudio-server-${RS_VERSION/"+"/"-"}-${architecture}.deb" ||
install_url="https://download2.rstudio.org/server/${UBUNTU_CODENAME}/${architecture}/rstudio-server-${RS_VERSION/"+"/"-"}-${architecture}.deb" &&
echo "Download from ${install_url}" &&
curl -sLo "${deb_file}" "${install_url}" ||
install_url="https://s3.amazonaws.com/rstudio-ide-build/server/${UBUNTU_CODENAME}/${architecture}/rstudio-server-${RS_VERSION/"+"/"-"}-${architecture}.deb" &&
echo "Download failed, try from ${install_url}" &&
curl -sLo "${deb_file}" "${install_url}" ||
echo "(!) Version ${RS_VERSION} for ${UBUNTU_CODENAME} ${architecture} is not found" && exit 1
fi

Expand Down

0 comments on commit 30dc48c

Please sign in to comment.