Check for presence of node

This commit is contained in:
Bob Mottram 2017-09-12 16:31:20 +01:00
parent e58eef0651
commit 1fd767b7c3
1 changed files with 7 additions and 2 deletions

View File

@ -565,8 +565,13 @@ install_patchwork() {
chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl
chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev
chroot "$rootdir" which node
chroot "$rootdir" which nodejs
if [ -f $rootdir/usr/bin/nodejs ]; then
cp $rootdir/usr/bin/nodejs $rootdir/usr/bin/node
fi
if [ ! -f $rootdir/usr/bin/node ]; then
echo $'/usr/bin/node not found'
exit 7235728
fi
wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
if [ ! -f $rootdir/root/npm_install.sh ]; then
echo $'Unable to download npm installer'