Rust's simple download script

Márcio Martins via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 10 05:12:34 PST 2015


On Monday, 9 November 2015 at 23:07:57 UTC, Andrei Alexandrescu 
wrote:
> Rust has a nice way to download at 
> https://www.rust-lang.org/downloads.html for Posix:
>
> $ curl -sSf https://static.rust-lang.org/rustup.sh | sh -s --
>
> The method is simple and transparent. An optional 
> --channel=beta or --channel=nightly parameter chooses between a 
> stable release (default), beta, or nightly build.
>
> Should we do something similar?
>
>
> Andrei

I also think curl | sh is bad, but the idea to have a quick 
no-brain "just works" installation is great. One good step would 
be providing packages for all major distros and providing a wget 
| pkginstall command which effectively does the same thing: wget 
DMD.deb && dpkg -i DMD.deb for Debian/Ubuntu

For example, newbies to Ubuntu might not even know what dpkg is 
so they will not know what to do with a .deb file since their 
world consists of apt-get mostly. Many people also don't know 
what x86 or x86_AMD64 stand for so yet another doubt in a 
potential downloaders mind.

Could then combine this with OS detection through user-agent on 
the website and show the user the most likely option and 
command-line suggestion.

Another thing I would do is not show LDC and GDC in the front 
page but have a "other options" sort of thing. People are afraid 
to fail and each decision is a potential failure that will scare 
new people off. The idea is that people that already use D know 
where to find the other compilers and more importantly what they 
are, but someone that does not use D might get intimidated by too 
many choices they don't have the knowledge to make confidently.

If in doubt, A/B test it. :)


More information about the Digitalmars-d mailing list