Skip to content

Commit

Permalink
look for available versions of node
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Jan 13, 2012
1 parent 39147d3 commit 0146af8
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions bin/compile
Expand Up @@ -4,11 +4,6 @@
# fail fast
set -e

function error() {
echo " ! $*"
exit 1
}

function mktmpdir() {
dir=$(mktemp -t node-$1-XXXX)
rm -rf $dir
Expand Down Expand Up @@ -38,14 +33,7 @@ run_npm() {
unset GIT_DIR

function manifest_versions() {
curl "http://${S3_BUCKET}.s3.amazonaws.com/manifest.${1}" -s -o - | tr -s '\n' ' '
}

function resolve_versions() {
args=""
for version in $1; do args="${args} -v \"${version}\""; done
for version in $2; do args="${args} -r \"${version}\""; done
eval $LP_DIR/vendor/node-semver/bin/semver ${args} | tail -n1
curl "http://${S3_BUCKET}.s3.amazonaws.com/manifest.${1}" -s -o -
}

# config
Expand Down Expand Up @@ -126,6 +114,9 @@ VENDORED_NODE="$(mktmpdir node)"
VENDORED_NPM="$(mktmpdir npm)"
VENDORED_SCONS="$(mktmpdir scons)"

# determine node version
echo "available versions of node: $(manifest_versions "nodejs")"

# download and unpack packages
echo "-----> Fetching Node.js binaries"
mkdir -p $VENDORED_NODE && curl $NODE_PACKAGE -s -o - | tar xzf - -C $VENDORED_NODE
Expand Down

0 comments on commit 0146af8

Please sign in to comment.