Skip to content

更新下载tar.gz路径 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions node_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@
# bjzllou 2012-08-13

if [ $# -eq 0 ]; then
VERSION=0.6.4
VERSION=latest
else
VERSION=$1
fi

echo "install v$VERSION of node..."
sleep 1

NODE_VERSION=node-v$VERSION
NODE_TAR=${NODE_VERSION}.tar.gz
if [ "$VERSION" = "latest" ]; then
NODE_VERSION=node-latest
NODE_TAR=node-latest.tar.gz
DOWNLOAD_URL=http://nodejs.org/dist/node-latest.tar.gz
else
NODE_VERSION=node-v$VERSION
NODE_TAR=${NODE_VERSION}.tar.gz
DOWNLOAD_URL=http://nodejs.org/dist/v${VERSION}/${NODE_TAR}
fi

APP_HOME=/home/app
DOWNLOAD_HOME=/home/download

Expand Down Expand Up @@ -42,7 +50,7 @@ if [ -f $NODE_TAR ]; then
echo 'found'
else
echo "download $NODE_VERSION..."
wget http://nodejs.org/dist/${NODE_TAR}
wget $DOWNLOAD_URL
fi

tar -zxvf $NODE_TAR
Expand Down