Update node version on mesh build
This commit is contained in:
parent
15b6762f79
commit
33fe399457
|
@ -562,13 +562,7 @@ INSTALL_DIR=$HOME/build
|
|||
INSTALLING_MESH=
|
||||
|
||||
install_patchwork() {
|
||||
NPM_ARCH='ia32'
|
||||
if [[ $ARCHITECTURE == 'arm'* ]]; then
|
||||
NPM_ARCH='armv7l'
|
||||
fi
|
||||
if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then
|
||||
NPM_ARCH='x64'
|
||||
fi
|
||||
get_npm_arch
|
||||
|
||||
git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork
|
||||
|
||||
|
|
|
@ -43,6 +43,16 @@ NPM_VERSION='4.0.5'
|
|||
# so that it can be removed if tere are no apps which need it
|
||||
NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps
|
||||
|
||||
function get_npm_arch {
|
||||
NPM_ARCH='ia32'
|
||||
if [[ $ARCHITECTURE == 'arm'* ]]; then
|
||||
NPM_ARCH='armv7l'
|
||||
fi
|
||||
if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then
|
||||
NPM_ARCH='x64'
|
||||
fi
|
||||
}
|
||||
|
||||
function mesh_install_nodejs {
|
||||
chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl
|
||||
chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev
|
||||
|
@ -73,6 +83,14 @@ function mesh_install_nodejs {
|
|||
sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh
|
||||
chroot "$rootdir" /root/npm_install.sh
|
||||
fi
|
||||
if [ ! -f $rootdir/usr/bin/npm ]; then
|
||||
echo $'npm was not installed'
|
||||
exit 5290462
|
||||
fi
|
||||
|
||||
# update from the old debian nodejs version
|
||||
get_npm_arch
|
||||
chroot "$rootdir" npm install --arch=$NPM_ARCH node@$NODEJS_VERSION -g
|
||||
}
|
||||
|
||||
function remove_nodejs {
|
||||
|
|
Loading…
Reference in New Issue