Skip to content

Instantly share code, notes, and snippets.

@hubwub
Created December 23, 2014 22:33
Show Gist options
  • Save hubwub/dc64b4c1f66afbc1307f to your computer and use it in GitHub Desktop.
Save hubwub/dc64b4c1f66afbc1307f to your computer and use it in GitHub Desktop.

Revisions

  1. Anne Celestino created this gist Dec 23, 2014.
    19 changes: 19 additions & 0 deletions using-homebrew.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    # using Homebrew

    # Note: `brew install npm` has problems, as of 2010-12-30.
    # hopefully it will eventually be good and happy.
    # As of [email protected], however, this is an option

    PREFIX=$(brew --prefix)

    # take ownership
    # this will also let homebrew work without using sudo
    # please don't do this if you don't know what it does!
    sudo mkdir -p $PREFIX/{share/man,bin,lib/node,include/node}
    sudo chown -R $USER $PREFIX/{share/man,bin,lib/node,lib/node_modules,include/node}

    brew install node

    # now install npm
    # prefix will default to $(brew --prefix)
    curl -L https://www.npmjs.org/install.sh | sh