Rust's simple download script
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 11 02:24:54 PST 2015
On 11/10/2015 12:07 AM, 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
Yes, such an installer would be helpful and I already wrote it twice.
https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/script/d.rb
https://github.com/MartinNowak/heroku-buildpack-d/blob/master/bin/compile
This would be fairly simple to adopt (choosing a good default install
location, e.g. ~/.dlang) and can already install the latest dmd, gdc,
ldc, any specific dmd-2.068.2, ldc-0.16.1-alpha1 version, and dub.
This does not replace a good package installer, but is great for simply
downloading and testing without doing a system wide installation.
For the necessary env changes we could adopt something like virtualenv's
activate/deactive, i.e. `source ~/.dlang/dmd-2.069.0/activate` to use
dmd-2.069.0. And of course we can activate the env after the download.
Disclaimer: I did not just volunteer to write the script but I'm glad to
help anyone doing so.
More information about the Digitalmars-d
mailing list