typelead / eta

The Eta Programming Language, a dialect of Haskell on the JVM
https://eta-lang.org
BSD 3-Clause "New" or "Revised" License
2.61k stars 145 forks source link

One-line installation #723

Open rahulmutt opened 6 years ago

rahulmutt commented 6 years ago

As suggested by @hepin1989, it would be useful to have a one-line command a user can download and install with. Something that looks like this:

sudo curl -L -o /usr/local/bin/mill https://github.com/lihaoyi/mill/releases/download/0.1.7/0.1.7 && sudo chmod +x /usr/local/bin/mill

@jneira Do you happen to know the equivalent one-liner for Windows?

NickSeagull commented 6 years ago

It would be something like this:

For CMD (legacy Windows prompt):

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

For PowerShell (new Windows prompt):

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
rahulmutt commented 6 years ago

Thanks @NickSeagull! Is there a place where we can download the executable such that it's on the default PATH for Windows ?

NickSeagull commented 6 years ago

Not really @rahulmutt , we'd have to create a script that places the binary somewhere and appends that "somewhere" to the path.

jneira commented 6 years ago

Jumm, the one liner thing for windows is a little bit more complex than nix one. I wonder if the more user-friendly option for windows would be an installer (like stack f.e.).