Last active
April 2, 2024 16:51
-
-
Save rvagg/742f811be491a49ba0b9 to your computer and use it in GitHub Desktop.
Revisions
-
rvagg revised this gist
Feb 6, 2020 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains 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 @@ -60,11 +60,12 @@ while true; do url="https://${domain}/download/${type}/$latest/node-${latest}-${os}-${arch}.tar" if [ "X${hasxz}" == "X" ]; then url="${url}.gz" pipecmd="| tar -zx ${tarargs}" else url="${url}.xz" pipecmd="| xzcat | tar -x ${tarargs}" fi echo "Downloading and unpacking ${url} to ${targetdir}..." bash -c "curl -sL '${url}' ${pipecmd}" break fi -
rvagg revised this gist
Feb 6, 2020 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains 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 @@ -7,10 +7,12 @@ hasxz=$(which xzcat) os=$(uname | tr '[A-Z]' '[a-z]') arch=$(uname -m) targetdir="/usr/local/" domain=nodejs.org tarargs=" --strip-components=1 --exclude ./CHANGELOG.md --exclude ./README.md --exclude ./LICENSE -C ${targetdir}" [[ "$arch" == "x86_64" ]] && arch=x64 [[ "$arch" == "x686" ]] && arch=x86 [[ "$arch" == "x86" ]] && domain=unofficial-builds.nodejs.org type=release line="" @@ -47,15 +49,15 @@ case $key in esac done latest=$(curl -sL https://${domain}/download/${type}/index.tab | grep "^v${line}" | awk '/^v[0-9]/{ print $1; exit }') while true; do if [ "X${yorn}" == "Xn" ]; then break fi if [ "X${yorn}" == "Xy" ]; then url="https://${domain}/download/${type}/$latest/node-${latest}-${os}-${arch}.tar" if [ "X${hasxz}" == "X" ]; then url="${url}.gz" pipecmd="| tar -zvx ${tarargs}" @@ -64,7 +66,6 @@ while true; do pipecmd="| xzcat | tar -vx ${tarargs}" fi bash -c "curl -sL '${url}' ${pipecmd}" break fi -
rvagg revised this gist
Feb 6, 2020 . 1 changed file with 4 additions and 7 deletions.There are no files selected for viewing
This file contains 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 @@ -7,13 +7,10 @@ hasxz=$(which xzcat) os=$(uname | tr '[A-Z]' '[a-z]') arch=$(uname -m) targetdir="/usr/local/" tarargs=" --strip-components=1 --exclude ./CHANGELOG.md --exclude ./README.md --exclude ./LICENSE -C ${targetdir}" [[ "$arch" == "x86_64" ]] && arch=x64 [[ "$arch" == "x686" ]] && arch=x32 type=release line="" @@ -50,15 +47,15 @@ case $key in esac done latest=$(curl -sL https://nodejs.org/download/${type}/index.tab | grep "^v${line}" | awk '/^v[0-9]/{ print $1; exit }') while true; do if [ "X${yorn}" == "Xn" ]; then break fi if [ "X${yorn}" == "Xy" ]; then url="https://nodejs.org/download/${type}/$latest/node-${latest}-${os}-${arch}.tar" if [ "X${hasxz}" == "X" ]; then url="${url}.gz" pipecmd="| tar -zvx ${tarargs}" -
rvagg revised this gist
Jul 17, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains 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 @@ -66,8 +66,8 @@ while true; do url="${url}.xz" pipecmd="| xzcat | tar -vx ${tarargs}" fi bash -c "curl -sL '${url}' ${pipecmd}" rm -f ${targetdir}CHANGELOG.md ${targetdir}LICENSE ${targetdir}README.md break fi -
rvagg revised this gist
Jul 17, 2019 . 1 changed file with 8 additions and 5 deletions.There are no files selected for viewing
This file contains 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 @@ -8,9 +8,12 @@ os=$(uname | tr '[A-Z]' '[a-z]') arch=$(uname -m) targetdir="/usr/local/" tarargs=" --strip-components=1 -C ${targetdir}" domain=nodejs.org [[ "$arch" == "x86_64" ]] && arch=x64 [[ "$arch" == "x686" ]] && arch=x86 [[ "$arch" == "x86" ]] && domain=unofficial-builds.nodejs.org type=release line="" @@ -47,24 +50,24 @@ case $key in esac done latest=$(curl -sL https://${domain}/download/${type}/index.tab | grep "^v${line}" | awk '/^v[0-9]/{ print $1; exit }') while true; do if [ "X${yorn}" == "Xn" ]; then break fi if [ "X${yorn}" == "Xy" ]; then url="https://${domain}/download/${type}/$latest/node-${latest}-${os}-${arch}.tar" if [ "X${hasxz}" == "X" ]; then url="${url}.gz" pipecmd="| tar -zvx ${tarargs}" else url="${url}.xz" pipecmd="| xzcat | tar -vx ${tarargs}" fi echo bash -c "curl -sL '${url}' ${pipecmd}" echo rm -f ${targetdir}CHANGELOG.md ${targetdir}LICENSE ${targetdir}README.md break fi -
rvagg revised this gist
Oct 26, 2018 . 1 changed file with 46 additions and 13 deletions.There are no files selected for viewing
This file contains 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,27 +1,55 @@ #!/bin/bash # Note your /usr/local will need to be writable by the user running it, # alternatively run it with `sudo` hasxz=$(which xzcat) os=$(uname | tr '[A-Z]' '[a-z]') arch=$(uname -m) targetdir="/usr/local/" tarargs=" --strip-components=1 -C ${targetdir}" [[ "$arch" == "x86_64" ]] && arch=x64 [[ "$arch" == "x686" ]] && arch=x32 type=release line="" yorn="" while [[ $# -gt 0 ]] do key="$1" case $key in -h|--help) echo "Usage: install-node.sh [-h|--nightly] [-l|--line <release line>] [-y|--yes]" echo " Where:" echo " --nightly will fetch the latest nightly version instead of the latest release version" echo " --line <release line> will let you select a major version, e.g. --line 10" echo " (note --line will match as much of the version as you want, e.g. --line 10.12 or --line 10.12.0)" echo " --yes will not promot you for confirmation before installing" exit 1 ;; -n|--nightly) shift ;; -y|--yes) yorn="y" shift ;; -l|--line) line="$2" shift shift ;; *) shift ;; esac done latest=$(curl -sL https://nodejs.org/download/${type}/index.tab | grep "^v${line}" | awk '/^v[0-9]/{ print $1; exit }') while true; do if [ "X${yorn}" == "Xn" ]; then break fi @@ -30,12 +58,17 @@ while true; do url="https://nodejs.org/download/${type}/$latest/node-${latest}-${os}-${arch}.tar" if [ "X${hasxz}" == "X" ]; then url="${url}.gz" pipecmd="| tar -zvx ${tarargs}" else url="${url}.xz" pipecmd="| xzcat | tar -vx ${tarargs}" fi bash -c "curl -sL '${url}' ${pipecmd}" rm -f ${targetdir}CHANGELOG.md ${targetdir}LICENSE ${targetdir}README.md break fi echo -n "Download and install Node.js ${latest} (${os}/${arch})? [y/n] " yorn="" read yorn done -
rvagg revised this gist
Jun 29, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains 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 @@ -35,7 +35,7 @@ while true; do url="${url}.xz" pipecmd="| xzcat | tar -vx --strip-components=1 -C /usr/local/" fi bash -c "curl -sL '${url}' ${pipecmd}" break fi done -
rvagg revised this gist
Jun 29, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains 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 @@ -27,7 +27,7 @@ while true; do fi if [ "X${yorn}" == "Xy" ]; then url="https://nodejs.org/download/${type}/$latest/node-${latest}-${os}-${arch}.tar" if [ "X${hasxz}" == "X" ]; then url="${url}.gz" pipecmd="| tar -zvx --strip-components=1 -C /usr/local/" -
rvagg renamed this gist
Jan 21, 2016 . 1 changed file with 7 additions and 13 deletions.There are no files selected for viewing
This file contains 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,30 +1,24 @@ #!/bin/bash # Usage: # ./install-node.sh # or for nightly: # ./install-node.sh --nightly hasxz=$(which xzcat) os=$(uname | tr '[A-Z]' '[a-z]') arch=$(uname -m) [[ "$arch" == "x86_64" ]] && arch=x64 [[ "$arch" == "x686" ]] && arch=x32 type=release [[ "X$1" == "X--nightly" ]] && type=nightly latest=$(curl -sL https://nodejs.org/download/${type}/index.tab | head -2 | tail -1 | awk '{ print $1 }') while true; do echo -n "Download and install Node.js ${latest} (${os}/${arch})? [y/n] " yorn="" read yorn @@ -33,7 +27,7 @@ while true; do fi if [ "X${yorn}" == "Xy" ]; then url="https://nodejs.org/download/${type}/$latest/node-${latest}-${os}-x64.tar" if [ "X${hasxz}" == "X" ]; then url="${url}.gz" pipecmd="| tar -zvx --strip-components=1 -C /usr/local/" @@ -44,4 +38,4 @@ while true; do bash -c "curl -sL '${auth}' '${url}' ${pipecmd}" break fi done -
rvagg revised this gist
Jul 12, 2015 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains 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 @@ -6,17 +6,20 @@ # ./install-iojs.sh --nightly # or for next-nightly: # ./install-iojs.sh --next-nightly # or for RC: # ./install-iojs.sh --rc hasxz=$(which xzcat) os=$(uname | tr '[A-Z]' '[a-z]') arch=$(uname -m) [[ "$arch" == "x86_64" ]] && arch=x64 [[ "$arch" == "x686" ]] && arch=x32 type=release [[ "X$1" == "X--nightly" ]] && type=nightly [[ "X$1" == "X--next-nightly" ]] && type=next-nightly [[ "X$1" == "X--rc" ]] && type=rc latest=$(curl -sL https://iojs.org/download/${type}/index.tab | head -2 | tail -1 | awk '{ print $1 }') -
rvagg revised this gist
Jul 12, 2015 . 3 changed files with 44 additions and 36 deletions.There are no files selected for viewing
This file contains 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,18 +0,0 @@ This file contains 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,18 +0,0 @@ This file contains 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,44 @@ #!/bin/bash # Usage: # ./install-iojs.sh # or for nightly: # ./install-iojs.sh --nightly # or for next-nightly: # ./install-iojs.sh --next-nightly hasxz=$(which xzcat) os=$(uname | tr '[A-Z]' '[a-z]') arch=$(uname -m) [[ "$arch" == "x86_64" ]] && arch=x64 [[ "$arch" == "x686" ]] && arch=x32 type=release [[ "X$1" == "X--nightly" ]] && type=nightly [[ "X$1" == "X--next-nightly" ]] && type=next-nightly latest=$(curl -sL https://iojs.org/download/${type}/index.tab | head -2 | tail -1 | awk '{ print $1 }') while true; do echo -n "Download and install io.js ${latest} (${os}/${arch})? [y/n] " yorn="" read yorn if [ "X${yorn}" == "Xn" ]; then break fi if [ "X${yorn}" == "Xy" ]; then url="https://iojs.org/download/${type}/$latest/iojs-${latest}-${os}-${arch}.tar" if [ "X${hasxz}" == "X" ]; then url="${url}.gz" pipecmd="| tar -zvx --strip-components=1 -C /usr/local/" else url="${url}.xz" pipecmd="| xzcat | tar -vx --strip-components=1 -C /usr/local/" fi bash -c "curl -sL '${auth}' '${url}' ${pipecmd}" break fi done -
rvagg revised this gist
Apr 14, 2015 . 2 changed files with 18 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.This file contains 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,18 @@ #!/bin/bash # Usage: # sudo ./install-iojs-nightly.sh # or for next-nightly: # sudo ./install-iojs-nightly.sh next type=nightly if [ "X$1" == "Xnext" ]; then type=next-nightly fi latest=$(curl -sL https://iojs.org/download/${type}/index.tab | head -2 | tail -1 | awk '{ print $1 }') url="https://iojs.org/download/${type}/$latest/iojs-${latest}-darwin-x64.tar.gz" echo "Downloading ${url}..." curl -sL $url | tar -vzx --strip-components=1 -C /usr/local/ -
rvagg created this gist
Apr 12, 2015 .There are no files selected for viewing
This file contains 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,18 @@ #!/bin/bash # Usage: # sudo ./install-iojs-nightly.sh # or for next-nightly: # sudo ./install-iojs-nightly.sh next type=nightly if [ "X$1" == "Xnext" ]; then type=next-nightly fi latest=$(curl -sL https://iojs.org/download/${type}/index.tab | head -2 | tail -1 | awk '{ print $1 }') url="https://iojs.org/download/${type}/$latest/iojs-${latest}-linux-x64.tar.xz" echo "Downloading ${url}..." curl -sL $url | xzcat | tar -vx --strip-components=1 -C /usr/local/