Reputation: 51
When installing meteor using curl install.meteor.com | sh
, it tries to install a launcher script at /usr/local/bin/meteor
. However, that requires me to supply an administrator password, which I cannot supply when trying to automate application deployment. in the script at install.meteor.com, there's a line here:
PREFIX="/usr/local"
I'd really like to change the PREFIX variable to "~/local", so that I can install this executable within my home directory and add the directory to my PATH variable. Is there a way to change this variable by sending a runtime variable without downloading the file and editing it myself? I understand that I could just use $HOME/.meteor/tools/latest/launch-meteor to launch my meteor application, but I'd prefer using the launch script instead.
Upvotes: 4
Views: 649
Reputation: 7366
Short and sweet:
curl install.meteor.com | sed -e 's/PREFIX="\/usr\/local"/PREFIX="\/~\/local"/g' | sh
With props to https://stackoverflow.com/a/10858043/223225. (Caveat: I've only tested this as curl install.meteor.com | sed -e 's/PREFIX="\/usr\/local"/PREFIX="\/~\/local"/g' | cat
rather than | sh
because I don't want to reinstall Meteor on my system at the moment, but I would be surprised if | sh
didn't also work.)
Upvotes: 2