Fixes per PR feedback
This commit is contained in:
parent
58408121ea
commit
e945acf089
2 changed files with 31 additions and 26 deletions
|
|
@ -24,9 +24,7 @@ R binaries are built for the following Linux operating systems:
|
||||||
- openSUSE 42.3, 15.0
|
- openSUSE 42.3, 15.0
|
||||||
- SUSE Linux Enterprise 12, 15
|
- SUSE Linux Enterprise 12, 15
|
||||||
|
|
||||||
## Installation
|
## Quick Installation
|
||||||
|
|
||||||
### Quick Installer
|
|
||||||
|
|
||||||
To use our quick install script to install R, simply run the following
|
To use our quick install script to install R, simply run the following
|
||||||
command. To use the quick installer, you must have root or sudo privileges,
|
command. To use the quick installer, you must have root or sudo privileges,
|
||||||
|
|
@ -36,6 +34,8 @@ and `curl` must be installed.
|
||||||
bash -c "$(curl -L https://rstd.io/r-install)"
|
bash -c "$(curl -L https://rstd.io/r-install)"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Manual Installation
|
||||||
|
|
||||||
### Specify R version
|
### Specify R version
|
||||||
|
|
||||||
Define the version of R that you want to install. Available versions
|
Define the version of R that you want to install. Available versions
|
||||||
|
|
@ -44,8 +44,7 @@ of R can be found here: https://cdn.rstudio.com/r/versions.json
|
||||||
R_VERSION=3.5.3
|
R_VERSION=3.5.3
|
||||||
```
|
```
|
||||||
|
|
||||||
### Download and install R Manually
|
### Download and install R
|
||||||
|
|
||||||
#### Ubuntu/Debian Linux
|
#### Ubuntu/Debian Linux
|
||||||
|
|
||||||
Download the deb package:
|
Download the deb package:
|
||||||
|
|
|
||||||
48
install.sh
48
install.sh
|
|
@ -34,6 +34,9 @@ R_VERSIONS=$(curl -s ${VERSIONS_URL} | \
|
||||||
cut -f2 -d "[" | cut -f1 -d "]" | \
|
cut -f2 -d "[" | cut -f1 -d "]" | \
|
||||||
# Removes the quotes and commas from the values
|
# Removes the quotes and commas from the values
|
||||||
sed -e 's/\"//g' | sed -e 's/\,//g' | \
|
sed -e 's/\"//g' | sed -e 's/\,//g' | \
|
||||||
|
# Appends a placeholder to the end of the string. Without an extra element at the
|
||||||
|
# end, the last version will be missing after we reverse the order.
|
||||||
|
{ IFS= read -r vers; printf '%s placeholder' "$vers"; } | \
|
||||||
# Reverses the order of the list
|
# Reverses the order of the list
|
||||||
( while read -d ' ' f;do g="$f${g+ }$g" ;done;echo "$g" ))
|
( while read -d ' ' f;do g="$f${g+ }$g" ;done;echo "$g" ))
|
||||||
|
|
||||||
|
|
@ -43,19 +46,27 @@ detect_os () {
|
||||||
distro=$($OS | grep DISTRIB_ID | cut -f2 -d "=")
|
distro=$($OS | grep DISTRIB_ID | cut -f2 -d "=")
|
||||||
if test -f /etc/SuSE-release
|
if test -f /etc/SuSE-release
|
||||||
then
|
then
|
||||||
distro="SUSE"
|
distro="LEAP12"
|
||||||
fi
|
fi
|
||||||
if [[ -f /etc/centos-release || -f /etc/redhat-release ]]
|
if [[ -f /etc/centos-release || -f /etc/redhat-release ]]
|
||||||
then
|
then
|
||||||
distro="RedHat"
|
distro="RedHat"
|
||||||
fi
|
fi
|
||||||
|
if [[ $(cat /etc/os-release | grep -e "^CPE_NAME\=*" | cut -f 2 -d '=') =~ cpe:/o:suse:sles:12: ]]
|
||||||
|
then
|
||||||
|
distro="SLES12"
|
||||||
|
fi
|
||||||
|
if [[ $(cat /etc/os-release | grep -e "^CPE_NAME\=*" | cut -f 2 -d '=') =~ cpe:/o:opensuse:leap:42. ]]
|
||||||
|
then
|
||||||
|
distro="LEAP12"
|
||||||
|
fi
|
||||||
if [[ $(cat /etc/os-release | grep -e "^CPE_NAME\=*" | cut -f 2 -d '=') == "\"cpe:/o:opensuse:leap:15.0\"" ]]
|
if [[ $(cat /etc/os-release | grep -e "^CPE_NAME\=*" | cut -f 2 -d '=') == "\"cpe:/o:opensuse:leap:15.0\"" ]]
|
||||||
then
|
then
|
||||||
distro="SUSE15"
|
distro="SLES15"
|
||||||
fi
|
fi
|
||||||
if [[ $(cat /etc/os-release | grep -e "^CPE_NAME\=*" | cut -f 2 -d '=') == "\"cpe:/o:suse:sles:15\"" ]]
|
if [[ $(cat /etc/os-release | grep -e "^CPE_NAME\=*" | cut -f 2 -d '=') == "\"cpe:/o:suse:sles:15\"" ]]
|
||||||
then
|
then
|
||||||
distro="SUSE15"
|
distro="LEAP15"
|
||||||
fi
|
fi
|
||||||
if [[ $(cat /etc/os-release | grep -e "^ID\=*" | cut -f 2 -d '=') == "debian" ]]; then
|
if [[ $(cat /etc/os-release | grep -e "^ID\=*" | cut -f 2 -d '=') == "debian" ]]; then
|
||||||
distro="Debian"
|
distro="Debian"
|
||||||
|
|
@ -89,19 +100,14 @@ detect_os_version () {
|
||||||
# Returns the installer type
|
# Returns the installer type
|
||||||
detect_installer_type () {
|
detect_installer_type () {
|
||||||
os=$1
|
os=$1
|
||||||
if [ "${os}" = "SUSE" ]; then
|
case $os in
|
||||||
echo "rpm"
|
"RedHat" | "CentOS" | "LEAP12" | "LEAP15" | "SLES12" | "SLES15")
|
||||||
else
|
|
||||||
if [ "${os}" = "SUSE15" ]; then
|
|
||||||
echo "rpm"
|
echo "rpm"
|
||||||
else
|
;;
|
||||||
if [ "${os}" = "RedHat" ]; then
|
"Ubuntu" | "Debian")
|
||||||
echo "rpm"
|
echo "deb"
|
||||||
else
|
;;
|
||||||
echo "deb"
|
esac
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Lists available R versions
|
# Lists available R versions
|
||||||
|
|
@ -131,7 +137,7 @@ download_name () {
|
||||||
"Ubuntu" | "Debian")
|
"Ubuntu" | "Debian")
|
||||||
echo "r-${version}_1_amd64.deb"
|
echo "r-${version}_1_amd64.deb"
|
||||||
;;
|
;;
|
||||||
"SUSE" | "SUSE15")
|
"LEAP12" | "LEAP15" | "SLES12" | "SLES15")
|
||||||
echo "R-${version}-1-1.x86_64.rpm"
|
echo "R-${version}-1-1.x86_64.rpm"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -159,10 +165,10 @@ download_url () {
|
||||||
"Debian")
|
"Debian")
|
||||||
echo "${CDN_URL}/debian-9/pkgs/${name}"
|
echo "${CDN_URL}/debian-9/pkgs/${name}"
|
||||||
;;
|
;;
|
||||||
"SUSE")
|
"LEAP12" | "SLES12")
|
||||||
echo "${CDN_URL}/opensuse-42/pkgs/${name}"
|
echo "${CDN_URL}/opensuse-42/pkgs/${name}"
|
||||||
;;
|
;;
|
||||||
"SUSE15")
|
"LEAP15" | "SLES15")
|
||||||
echo "${CDN_URL}/opensuse-15/pkgs/${name}"
|
echo "${CDN_URL}/opensuse-15/pkgs/${name}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -251,7 +257,7 @@ install_rpm () {
|
||||||
fi
|
fi
|
||||||
${SUDO} yum install "${installer_name}"
|
${SUDO} yum install "${installer_name}"
|
||||||
;;
|
;;
|
||||||
"SUSE" | "SUSE15")
|
"LEAP12" | "LEAP15" | "SLES12" | "SLES15")
|
||||||
if ! has_sudo "zypper"; then
|
if ! has_sudo "zypper"; then
|
||||||
echo "Must have sudo privileges to run zypper"
|
echo "Must have sudo privileges to run zypper"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -270,10 +276,10 @@ install_pre () {
|
||||||
"RedHat" | "CentOS")
|
"RedHat" | "CentOS")
|
||||||
install_epel "${ver}"
|
install_epel "${ver}"
|
||||||
;;
|
;;
|
||||||
"SUSE")
|
"SLES12")
|
||||||
install_sci
|
install_sci
|
||||||
;;
|
;;
|
||||||
"SUSE15")
|
"LEAP12" | "LEAP15" | "SLES15")
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue