rstudio / r-builds

an opinionated environment for compiling R
GNU General Public License v3.0
101 stars 19 forks source link

Don't install prerelease R versions by default in quickinstall script #147

Closed glin closed 2 years ago

glin commented 2 years ago

@jonyoder noticed the quickinstall script was installing R devel as the default "latest" R version, which is probably not what most users would expect. This tweaks the R version sorting so that prerelease devel/next versions are sorted to the bottom but still available to install.

It also simplifies the sorting a bit, switching to the built-in sort command to do the sorting.

Old versions list:

 $ ./install.sh 
Available Versions
  devel
  next
  4.2.1
  4.2.0
  4.1.3
  4.1.2
  4.1.1
  4.1.0
  4.0.5
  4.0.4
  4.0.3
  4.0.2
  4.0.1
  4.0.0
  3.6.3
  3.6.2
  3.6.1
  3.6.0
  3.5.3
  3.5.2
  3.5.1
  3.5.0
  3.4.4
  3.4.3
  3.4.2
  3.4.1
  3.4.0
  3.3.3
  3.3.2
  3.3.1
  3.3.0
  3.2.5
  3.2.4
  3.2.3
  3.2.2
  3.2.1
  3.2.0
  3.1.3
  3.1.2
  3.1.1
  3.1.0
  3.0.3
  3.0.2
  3.0.1
  3.0.0
Enter version to install: (<ENTER> for latest)

New versions list:

$ ./install.sh 
Available Versions
  4.2.1
  4.2.0
  4.1.3
  4.1.2
  4.1.1
  4.1.0
  4.0.5
  4.0.4
  4.0.3
  4.0.2
  4.0.1
  4.0.0
  3.6.3
  3.6.2
  3.6.1
  3.6.0
  3.5.3
  3.5.2
  3.5.1
  3.5.0
  3.4.4
  3.4.3
  3.4.2
  3.4.1
  3.4.0
  3.3.3
  3.3.2
  3.3.1
  3.3.0
  3.2.5
  3.2.4
  3.2.3
  3.2.2
  3.2.1
  3.2.0
  3.1.3
  3.1.2
  3.1.1
  3.1.0
  3.0.3
  3.0.2
  3.0.1
  3.0.0
  next
  devel
Enter version to install: (<ENTER> for latest)