Skip to content

Instantly share code, notes, and snippets.

@sidorares
Created December 15, 2013 02:51

Revisions

  1. @fhemberger fhemberger revised this gist Oct 31, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-nodejs.sh
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ ARCH=x64
    PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"

    if test "v$VERSION" != "$CURRENT"; then
    echo "Installing node v$VERSION ($CURRENT)..."
    echo "Installing node v$VERSION ..."
    mkdir -p "$PREFIX" && \
    curl -# -L http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
    | tar xzvf - --strip-components=1 -C "$PREFIX"
  2. @fhemberger fhemberger revised this gist Oct 31, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-nodejs.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    CURRENT=$(node -v)
    VERSION=$(curl -L -s http://nodejs.org/dist/latest/ \
    | egrep -o '[0-9]+\.[0-9]+\.[0-9]+' \
    | \tail -n1)
    | tail -n1)
    PLATFORM=darwin
    ARCH=x64
    PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"
  3. @fhemberger fhemberger revised this gist Oct 31, 2012. 2 changed files with 16 additions and 6 deletions.
    20 changes: 15 additions & 5 deletions install-nodejs.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,18 @@
    #!/bin/sh

    PREFIX="$HOME/node-latest"
    LATEST=$(curl -s http://nodejs.org/dist/latest/ | egrep -o -m1 -e '"node.*?-darwin-x64.tar.gz"' | sed s/\"//g)
    CURRENT=$(node -v)
    VERSION=$(curl -L -s http://nodejs.org/dist/latest/ \
    | egrep -o '[0-9]+\.[0-9]+\.[0-9]+' \
    | \tail -n1)
    PLATFORM=darwin
    ARCH=x64
    PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"

    mkdir -p "$PREFIX" && \
    curl http://nodejs.org/dist/latest/$LATEST \
    | tar xzvf - --strip-components=1 -C "$PREFIX"
    if test "v$VERSION" != "$CURRENT"; then
    echo "Installing node v$VERSION ($CURRENT)..."
    mkdir -p "$PREFIX" && \
    curl -# -L http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
    | tar xzvf - --strip-components=1 -C "$PREFIX"
    else
    echo "Latest stable version of node already installed."
    fi
    2 changes: 1 addition & 1 deletion oneliner-nodejs.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    Starting with node v0.8.6, we're gonna be releasing official binary tarballs of the releases for the most common platform+architecture combos.

    Here's a simple script that will install the latest node version for OSX (64bit) using a simple `curl | tar` piping. By default the files will get installed into your HOME directory. Change the PREFIX variable to `/usr/local` if you're feeling ambitious (_note:_ you may need to run this as `root` depending on the PREFIX).
    Here's a simple script that will install the latest stable node using a simple `curl | tar` piping. By default the files will get installed into your HOME directory. Change the PREFIX variable to `/usr/local` if you're feeling ambitious (_note:_ you may need to run this as `root` depending on the PREFIX).
  4. @fhemberger fhemberger revised this gist Oct 30, 2012. 2 changed files with 5 additions and 7 deletions.
    10 changes: 4 additions & 6 deletions install-nodejs.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,8 @@
    #!/bin/sh

    VERSION=0.8.6
    PLATFORM=darwin
    ARCH=x64
    PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"
    PREFIX="$HOME/node-latest"
    LATEST=$(curl -s http://nodejs.org/dist/latest/ | egrep -o -m1 -e '"node.*?-darwin-x64.tar.gz"' | sed s/\"//g)

    mkdir -p "$PREFIX" && \
    curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
    | tar xzvf - --strip-components=1 -C "$PREFIX"
    curl http://nodejs.org/dist/latest/$LATEST \
    | tar xzvf - --strip-components=1 -C "$PREFIX"
    2 changes: 1 addition & 1 deletion oneliner-nodejs.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    Starting with node v0.8.6, we're gonna be releasing official binary tarballs of the releases for the most common platform+architecture combos.

    Here's a simple script that will install node using a simple `curl | tar` piping. By default the files will get installed into your HOME directory. Change the PREFIX variable to `/usr/local` if you're feeling ambitious (_note:_ you may need to run this as `root` depending on the PREFIX).
    Here's a simple script that will install the latest node version for OSX (64bit) using a simple `curl | tar` piping. By default the files will get installed into your HOME directory. Change the PREFIX variable to `/usr/local` if you're feeling ambitious (_note:_ you may need to run this as `root` depending on the PREFIX).
  5. @TooTallNate TooTallNate revised this gist Aug 7, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion oneliner-nodejs.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    Starting with node v0.8.6, we're gonna be releasing official binary tarballs of the releases for the most common platform+architecture combos.

    Here's a simple script that will install node using a simple `curl | tar` piping. By default the files will get installed into `/usr/local` (_note:_ you may need to run this as `root` depending on the PREFIX). Change the PREFIX variable to `/usr/local` if you're feeling ambitious.
    Here's a simple script that will install node using a simple `curl | tar` piping. By default the files will get installed into your HOME directory. Change the PREFIX variable to `/usr/local` if you're feeling ambitious (_note:_ you may need to run this as `root` depending on the PREFIX).
  6. @TooTallNate TooTallNate revised this gist Aug 7, 2012. 2 changed files with 11 additions and 14 deletions.
    10 changes: 10 additions & 0 deletions install-nodejs.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/bin/sh

    VERSION=0.8.6
    PLATFORM=darwin
    ARCH=x64
    PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"

    mkdir -p "$PREFIX" && \
    curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
    | tar xzvf - --strip-components=1 -C "$PREFIX"
    15 changes: 1 addition & 14 deletions oneliner-nodejs.md
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,3 @@
    Starting with node v0.8.6, we're gonna be releasing official binary tarballs of the releases for the most common platform+architecture combos.

    Here's a simple script that will install node using a simple `curl | tar` piping. By default the files will get installed into `/usr/local` (_note:_ you may need to run this as `root` depending on the PREFIX). Change the PREFIX variable to `/usr/local` if you're feeling ambitious.

    ``` bash
    #!/bin/sh

    VERSION=0.8.6
    PLATFORM=darwin
    ARCH=x64
    PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"

    mkdir -p "$PREFIX" && \
    curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
    | tar xzvf - --strip-components=1 -C "$PREFIX"
    ```
    Here's a simple script that will install node using a simple `curl | tar` piping. By default the files will get installed into `/usr/local` (_note:_ you may need to run this as `root` depending on the PREFIX). Change the PREFIX variable to `/usr/local` if you're feeling ambitious.
  7. @TooTallNate TooTallNate revised this gist Aug 7, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion oneliner-nodejs.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    Starting with node v0.8.6, we're gonna be releasing official binary tarballs of the releases for the most common platform+architecture combos.

    Here's a simple script that will install node using a simple `curl | tar` piping. By default the files will get installed into `/usr/local` (_note:_ you may need to stick `sudo` in front of the `tar` command). Change the PREFIX variable to `/usr/local` if you're feeling ambitious.
    Here's a simple script that will install node using a simple `curl | tar` piping. By default the files will get installed into `/usr/local` (_note:_ you may need to run this as `root` depending on the PREFIX). Change the PREFIX variable to `/usr/local` if you're feeling ambitious.

    ``` bash
    #!/bin/sh
  8. @TooTallNate TooTallNate revised this gist Aug 7, 2012. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion oneliner-nodejs.md
    Original file line number Diff line number Diff line change
    @@ -10,5 +10,7 @@ PLATFORM=darwin
    ARCH=x64
    PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"

    curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz | tar xzvf - --strip-components=1 -C $PREFIX
    mkdir -p "$PREFIX" && \
    curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
    | tar xzvf - --strip-components=1 -C "$PREFIX"
    ```
  9. @TooTallNate TooTallNate created this gist Aug 7, 2012.
    14 changes: 14 additions & 0 deletions oneliner-nodejs.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    Starting with node v0.8.6, we're gonna be releasing official binary tarballs of the releases for the most common platform+architecture combos.

    Here's a simple script that will install node using a simple `curl | tar` piping. By default the files will get installed into `/usr/local` (_note:_ you may need to stick `sudo` in front of the `tar` command). Change the PREFIX variable to `/usr/local` if you're feeling ambitious.

    ``` bash
    #!/bin/sh

    VERSION=0.8.6
    PLATFORM=darwin
    ARCH=x64
    PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"

    curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz | tar xzvf - --strip-components=1 -C $PREFIX
    ```