Merge pull request #680 from sayanee/armv6l-armv7l-support

fix: download url for iojs armv6l and armv7l. #678 #227
master
Jordan Harband 2015-03-01 22:57:21 -08:00
commit ceb66d1356
1 changed files with 6 additions and 2 deletions

8
nvm.sh 100644 → 100755
View File

@ -859,7 +859,6 @@ nvm_get_arch() {
case "$NVM_UNAME" in case "$NVM_UNAME" in
*x86_64*) NVM_ARCH=x64 ;; *x86_64*) NVM_ARCH=x64 ;;
*i*86*) NVM_ARCH=x86 ;; *i*86*) NVM_ARCH=x86 ;;
*armv6l*) NVM_ARCH=arm-pi ;;
*) NVM_ARCH="$(uname -m)" ;; *) NVM_ARCH="$(uname -m)" ;;
esac esac
echo "$NVM_ARCH" echo "$NVM_ARCH"
@ -937,7 +936,12 @@ nvm_install_node_binary() {
if [ -n "$NVM_OS" ]; then if [ -n "$NVM_OS" ]; then
if nvm_binary_available "$VERSION"; then if nvm_binary_available "$VERSION"; then
t="$VERSION-$NVM_OS-$(nvm_get_arch)" local NVM_ARCH
NVM_ARCH="$(nvm_get_arch)"
if [ $NVM_ARCH = "armv6l" ]; then
NVM_ARCH="arm-pi"
fi
t="$VERSION-$NVM_OS-$NVM_ARCH"
url="$NVM_NODEJS_ORG_MIRROR/$VERSION/node-${t}.tar.gz" url="$NVM_NODEJS_ORG_MIRROR/$VERSION/node-${t}.tar.gz"
sum=`nvm_download -L -s $NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt -o - | command grep node-${t}.tar.gz | command awk '{print $1}'` sum=`nvm_download -L -s $NVM_NODEJS_ORG_MIRROR/$VERSION/SHASUMS.txt -o - | command grep node-${t}.tar.gz | command awk '{print $1}'`
local tmpdir local tmpdir