|
@@ -74,28 +74,26 @@ function mesh_install_nodejs {
|
74
|
74
|
exit 7235728
|
75
|
75
|
fi
|
76
|
76
|
|
77
|
|
- if [ -f /usr/share/npm/bin/npm-cli.js ]; then
|
78
|
|
- ln -s /usr/share/npm/bin/npm-cli.js /usr/bin/npm
|
79
|
|
- else
|
80
|
|
- wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
|
81
|
|
- if [ ! -f $rootdir/root/npm_install.sh ]; then
|
82
|
|
- echo $'Unable to download npm installer'
|
83
|
|
- exit 8793636
|
84
|
|
- fi
|
85
|
|
- chroot "$rootdir" chmod +x /root/npm_install.sh
|
86
|
|
- sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh
|
87
|
|
- chroot "$rootdir" /root/npm_install.sh
|
|
77
|
+ wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
|
|
78
|
+ if [ ! -f $rootdir/root/npm_install.sh ]; then
|
|
79
|
+ echo $'Unable to download npm installer'
|
|
80
|
+ exit 8793636
|
88
|
81
|
fi
|
|
82
|
+ chroot "$rootdir" chmod +x /root/npm_install.sh
|
|
83
|
+ sed -i "s|t=\"\${npm_install}\"|t=\"$NPM_VERSION\"|g" $rootdir/root/npm_install.sh
|
|
84
|
+ chroot "$rootdir" /root/npm_install.sh
|
|
85
|
+
|
89
|
86
|
if [ ! -f $rootdir/usr/bin/npm ]; then
|
90
|
87
|
echo $'npm was not installed'
|
91
|
88
|
exit 5290462
|
92
|
89
|
fi
|
|
90
|
+ cp $rootdir/usr/bin/npm $rootdir/root/npm
|
93
|
91
|
|
94
|
92
|
# update from the old debian nodejs version
|
95
|
93
|
get_npm_arch
|
96
|
94
|
chroot "$rootdir" npm install --arch=$NPM_ARCH -g n@${NODEJS_N_VERSION} --save
|
97
|
95
|
chroot "$rootdir" n --arch $N_ARCH ${NODEJS_VERSION}
|
98
|
|
- chroot "$rootdir" npm install -g --arch $NPM_ARCH npm@${NPM_VERSION} --save
|
|
96
|
+ cp $rootdir/root/npm $rootdir/usr/bin/npm
|
99
|
97
|
}
|
100
|
98
|
|
101
|
99
|
function remove_nodejs {
|