You are here: Home / Blog / The Meteor Install Script

The Meteor Install Script

Posted by Fulvio Casali at Nov 10, 2014 02:12 AM |
Filed under:
What it does and where it puts things.

The first step in the Meteor tutorial is to install meteor with the following minimalist shell command:

curl https://install.meteor.com/ | sh

Here is what it does:

  1. The script runs on OS X and Linux only, so first it checks which system you are on, and quits if it's neither.  Then it branches off according to your OS.
  2. There are also come checks for "very old" versions of Meteor (pre-April 2013), with instructions for how to deal with those.
  3. Any previous installation in ~/.meteor gets wiped.
  4. Any leftover temporary install directory in ~/.meteor-install-tmp gets wiped.
  5. It downloads the meteor bootstrap tarball and extracts it to ~/.meteor-install-tmp.
  6. It moves ~/.meteor-install-tmp/.meteor to ~/.meteor.
  7. It finds the symlink ~/.meteor/meteor, and copies the script scripts/admin/launch-meteor in the same directory to /usr/local/bin/meteor (sudo required).
  8. It prints the helpful message:
To get started fast:
$ meteor create ~/my_cool_app
$ cd ~/my_cool_app
$ meteor
Or see the docs at:
docs.meteor.com

 

This is the happy path, but of course, the installer also deals with various kinds of error conditions.

The version is set in the variable RELEASE in the script, so I suppose if you want to upgrade to a later version you need to download the script and run it again.  I presume the URL in the install command will always point to the latest version.

In a future installment, I will dissect the launch-meteor and the meteor scripts themselves, because they seem to be responsible for downloading all the node and other javascript dependencies.  For the time being, I am trying to achieve some kind of isolation by doing all this inside a nodeenv virtual environment.

Filed under: