Don't install node explicitly on distribute.sh

It's now done automatically as part of npm install
This commit is contained in:
Juan Cruz Viotti 2015-02-13 14:57:00 -04:00
parent eb27b8d860
commit 5226e7db16
2 changed files with 0 additions and 33 deletions

View File

@ -16,7 +16,6 @@
"bin": {
"resin": "./bin/resin"
},
"bundled_engine": "v0.12.0",
"scripts": {
"prepublish": "gulp build",
"test": "gult test",

View File

@ -1,8 +1,5 @@
#!/bin/bash
NODE_DIST_URL="http://nodejs.org/dist"
CURL="curl -#"
# http://stackoverflow.com/questions/1955505/parsing-json-with-sed-and-awk
function parse_json() {
echo $1 | sed -e 's/[{}]/''/g' | awk -F=':' -v RS=',' "\$1~/\"$2\"/ {print}" | sed -e "s/\"$2\"://" | tr -d "\n\t" | sed -e 's/\\"/"/g' | sed -e 's/\\\\/\\/g' | sed -e 's/^[ \t]*//g' | sed -e 's/^"//' -e 's/"$//'
@ -11,7 +8,6 @@ function parse_json() {
PACKAGE_JSON=`cat package.json`
VERSION=$(parse_json "$PACKAGE_JSON" version)
NAME=$(parse_json "$PACKAGE_JSON" name)
NODE_VERSION=$(parse_json "$PACKAGE_JSON" bundled_engine)
function print_banner() {
local message=$1
@ -21,32 +17,6 @@ function print_banner() {
echo ""
}
function download_node() {
local os=$1
local arch=$2
local version=$3
local output=$4
local remote_package="node-$version-$os-$arch"
local package="node-$os-$arch"
print_banner "Downloading $remote_package"
mkdir -p $output
if [ "$os" == "win32" ]; then
if [ "$arch" == "x86" ]; then
$CURL $NODE_DIST_URL/$version/node.exe -o $output/$package.exe
else
$CURL $NODE_DIST_URL/$version/$arch/node.exe -o $output/$package.exe
fi
else
$CURL $NODE_DIST_URL/$version/$remote_package.tar.gz | tar xz -C $output/
cp $output/$remote_package/bin/node $output/$package.bin
rm -rf $output/$remote_package
fi
}
function distribute() {
local os=$1
local arch=$2
@ -61,8 +31,6 @@ function distribute() {
cp -vrf lib build/$package
cp -vrf package.json build/$package
node ./node_modules/node-binary/bin/cli.js download $NODE_VERSION build/$package/bin/node --arch $arch --os $os
print_banner "Running npm install"
cd build/$package