Last active
September 15, 2015 02:05
-
-
Save izolate/e36281cbe859608b4988 to your computer and use it in GitHub Desktop.
Revisions
-
izolate renamed this gist
May 7, 2015 . 1 changed file with 11 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ IOJS_VERSION=v0.0.0 IOJS_DIR=$HOME/.iojs iojs_install() { iojs_setup @@ -9,28 +9,29 @@ iojs_install() { } iojs_setup() { echo '[1/3] Getting latest version' IOJS_VERSION=v${1:-$(curl -s https://iojs.org/dist/index.json | sed -e 's/^.*"version":"\([^"]*\)".*$/\1/' | head -n 2 | tail -n -1 | cut -c 2-)} mkdir -p $IOJS_DIR && rm -rf $IOJS_DIR/* } iojs_download() { echo '[2/3] Downloading io.js' ${IOJS_VERSION} curl -s https://iojs.org/dist/${IOJS_VERSION}/iojs-${IOJS_VERSION}-linux-x64.tar.gz | tar zx -C $IOJS_DIR --strip-components=1 } iojs_assemble() { echo '[3/3] Adding binaries to PATH' printf '%s\n' '' '# io.js environment' "export PATH=$IOJS_DIR/bin:\$PATH" \ "export NODE_PATH=$IOJS_DIR/lib/node_modules" >> ~/.bashrc . ~/.bashrc } iojs_teardown() { echo '====> Done' printf '%s\n' '' "iojs -v: $(iojs -v)" "npm -v: $(npm -v)" unset -f iojs_install iojs_setup iojs_download iojs_assemble iojs_teardown IOJS_VERSION IOJS_DIR } iojs_install -
izolate revised this gist
May 6, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,11 +26,11 @@ iojs_assemble() { echo '# io.js environment' >> ~/.bashrc echo 'export PATH=$HOME/.iojs/bin:$PATH' >> ~/.bashrc echo 'export NODE_PATH=$HOME/.iojs/lib/node_modules' >> ~/.bashrc . ~/.bashrc } iojs_teardown() { unset -f iojs_install iojs_setup iojs_download iojs_assemble iojs_teardown } iojs_install -
izolate created this gist
May 6, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ IOJS_VERSION=v0.0.0 IOJS_DIR=~/.iojs iojs_install() { iojs_setup iojs_download iojs_assemble iojs_teardown } iojs_setup() { echo '1> Getting latest version' IOJS_VERSION=v${1:-$(curl -s https://iojs.org/dist/index.json | sed -e 's/^.*"version":"\([^"]*\)".*$/\1/' | head -n 2 | tail -n -1 | cut -c 2-)} mkdir -p $IOJS_DIR rm -rf $IOJS_DIR/* } iojs_download() { echo '2> Downloading io.js' ${IOJS_VERSION} curl -s https://iojs.org/dist/${IOJS_VERSION}/iojs-${IOJS_VERSION}-linux-x64.tar.gz | tar zx -C $IOJS_DIR --strip-components=1 } iojs_assemble() { echo '3> Adding binaries to PATH' echo '# io.js environment' >> ~/.bashrc echo 'export PATH=$HOME/.iojs/bin:$PATH' >> ~/.bashrc echo 'export NODE_PATH=$HOME/.iojs/lib/node_modules' >> ~/.bashrc source ~/.bashrc } iojs_teardown() { unset -f iojs_install iojs_setup iojs_download iojs_teardown } iojs_install