From c54cc27566ddf43f77943f3c4aba07c8a4ddb153 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 16 Sep 2011 12:58:16 -0400 Subject: [PATCH] pushd (thanks @asenchi) --- support/package_node | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/support/package_node b/support/package_node index c7a1c2a42..a1e93210a 100755 --- a/support/package_node +++ b/support/package_node @@ -25,27 +25,29 @@ basedir="$( cd -P "$( dirname "$0" )" && pwd )" tempdir="$( mktemp -t node_XXXX )" rm -rf $tempdir mkdir -p $tempdir +pushd $tempdir -cd $tempdir && +# download and extract node +curl http://nodejs.org/dist/node-v${node_version}.tar.gz -o node.tgz +tar xzvf node.tgz - # download and extract node - curl http://nodejs.org/dist/node-v${node_version}.tar.gz -o node.tgz && - tar xzvf node.tgz && +# go into node dir +pushd node-v${node_version} - cd node-v${node_version} && +# build and package nodejs for heroku +heroku make -v -o $tempdir/node-${node_version}.tgz - # build and package nodejs for heroku - heroku make -v -o $tempdir/node-${node_version}.tgz && +# upload nodejs to s3 +$basedir/s3/s3 put language-pack-nodejs \ + nodejs-${node_version}.tgz $tempdir/node-${node_version}.tgz - # upload nodejs to s3 - $basedir/s3 put language-pack-nodejs \ - nodejs-${node_version}.tgz $tempdir/node-${node_version}.tgz && +# go into scons +pushd tools/scons - # package scons - scons_version=$(ls tools/scons | grep "scons-local" | cut -d- -f3) && - cd tools/scons && - tar czvf $tempdir/scons-${scons_version}.tgz * && +# package scons +scons_version=$(ls | grep "scons-local" | cut -d- -f3) +tar czvf $tempdir/scons-${scons_version}.tgz * - # upload scons to s3 - $basedir/s3 put language-pack-nodejs \ - scons-${scons_version}.tgz $tempdir/scons-${scons_version}.tgz +# upload scons to s3 +$basedir/s3/s3 put language-pack-nodejs \ + scons-${scons_version}.tgz $tempdir/scons-${scons_version}.tgz