Set n architecture
This commit is contained in:
parent
33fe399457
commit
388f3d6168
|
@ -44,12 +44,15 @@ NPM_VERSION='4.0.5'
|
||||||
NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps
|
NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps
|
||||||
|
|
||||||
function get_npm_arch {
|
function get_npm_arch {
|
||||||
|
N_ARCH='x86'
|
||||||
NPM_ARCH='ia32'
|
NPM_ARCH='ia32'
|
||||||
if [[ $ARCHITECTURE == 'arm'* ]]; then
|
if [[ $ARCHITECTURE == 'arm'* ]]; then
|
||||||
NPM_ARCH='armv7l'
|
NPM_ARCH='armv7l'
|
||||||
|
N_ARCH='arm'
|
||||||
fi
|
fi
|
||||||
if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then
|
if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then
|
||||||
NPM_ARCH='x64'
|
NPM_ARCH='x64'
|
||||||
|
N_ARCH='x64'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +93,8 @@ function mesh_install_nodejs {
|
||||||
|
|
||||||
# update from the old debian nodejs version
|
# update from the old debian nodejs version
|
||||||
get_npm_arch
|
get_npm_arch
|
||||||
chroot "$rootdir" npm install --arch=$NPM_ARCH node@$NODEJS_VERSION -g
|
chroot "$rootdir" npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save
|
||||||
|
chroot "$rootdir" n --arch $N_ARCH ${NODEJS_VERSION}
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove_nodejs {
|
function remove_nodejs {
|
||||||
|
|
Loading…
Reference in New Issue