Closed nexflo closed 9 years ago
Well, for 64-bit Linux you could do something like:
$ curl https://iojs.org/dist/v2.3.3/iojs-v2.3.3-linux-x64.tar.xz | tar Jx --strip=1 -C /usr/local
Or change /usr/local
to ~/local
or something if you don't want to install it system-wide.
EDIT: If you want to point to the latest 64-bit Linux version, you could use something like:
$ curl https://iojs.org/dist/latest/iojs-$(curl -s https://iojs.org/dist/index.tab|awk 'NR==2'|sed s/\\t.*//)-linux-x64.tar.xz | tar Jx --strip=1 -C /usr/local
Store above somewhere in your local .bashrc
and run with that. Suggesting executing remote bash scripts on a front page or as part of the documentation is a bad idea (can't find all the flamewars on homebrew, etc installs but yeah).
edit: grammar.
curl | bash
causes so much irrational nerdrage that I'd say we want to keep simple one-liners off the README and not officially support them here in this project, or else we'll be drawn into constant defence with people who have opinions and nothing better to do than argue them
@rvagg: are repos which feature a line like that really swamped in such discussions? I'd certainly doubt that, and think a properly maintained install script could benefit our adoption/update rate.
What needs to be done is a sh
-compatible script like @mscdex's above, with proper platform/arch detection and helpful error messages if something goes wrong.
@silverwind just speaking from experience having to defend it on https://github.com/nodesource/distributions. We get occasional bursts of concocted outrage as someone decided to demonstrate how smart they are by saying that curl | bash
is a major security concern, this comes in from various social media channels. While occasionally I enjoy baiting the trolls I do get a bit troll-weary and don't particularly want to give them another reason to bash (geddit???) Node.
Perhaps just put me down as a -0 for this reason.
FWIW I have a script for doing this on Linux (incl ARM) & OS X if anyone's interested, I use this regularly to switch versions: https://gist.github.com/rvagg/742f811be491a49ba0b9
I'm -1, because: 1) there's enough scripts out there if anyone insists, 2) the net win is so minor; installing/updating is relatively rare (I'd rather help distributions improve/speed up their packaging) and 3) "Don't feed the trolls"
I think for future releases it would be awesome to have better packaging for Linux, published by the official releases here. Currently, the nodejs/iojs ecosystem is heavily dependent on maintainers pushing out fixes and releases and they are way behind the timeline, even the ppa of @chrislea.
I have an own build system in place at the moment, but it's supereasy to port. If you have a Debian/Ubuntu system up&running, you can port most of the stuff easily for all platforms (except a pkg file for OSX). It might make sense to go from the official releases here with the files and package them properly.
I'm gonna push something out later today with an initial bundler for iojs, similar to the one for lycheejs (in case anyone's interested).
@rvagg point taken. My main pain point is that I have been manually installing on Arch Linux ARM for a while now because there's no iojs on the official package channels for this distro, but I can see to changing that eventually.
Your script works well. If could see a few improvements being done, and I'd appreciate if you could put it on a repo, possibly on our org (we don't have to link to it).
Original question was answered, and the rest of us are not too sure about having it in the readme. Closing unless we really need to keep it open.
Wouldn't it make sense featuring a terminal one line installer on nodejs.org (and also hosting it here)
Something like: bash < <(curl http://h3manth.com/njs
Really like pages/apps...where I know i can install quickly via terminal, and dont need a GUI package manager.... especially for development env's. If this one is easily and cross plattform available, I would feature it prominently on nodejs.org