|
@@ -572,13 +572,17 @@ install_patchwork() {
|
572
|
572
|
echo $'/usr/bin/node not found'
|
573
|
573
|
exit 7235728
|
574
|
574
|
fi
|
575
|
|
- wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
|
576
|
|
- if [ ! -f $rootdir/root/npm_install.sh ]; then
|
577
|
|
- echo $'Unable to download npm installer'
|
578
|
|
- exit 8793636
|
|
575
|
+ if [ -f /usr/share/npm/bin/npm-cli.js ]; then
|
|
576
|
+ ln -s /usr/share/npm/bin/npm-cli.js /usr/bin/npm
|
|
577
|
+ else
|
|
578
|
+ wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
|
|
579
|
+ if [ ! -f $rootdir/root/npm_install.sh ]; then
|
|
580
|
+ echo $'Unable to download npm installer'
|
|
581
|
+ exit 8793636
|
|
582
|
+ fi
|
579
|
583
|
fi
|
580
|
584
|
chroot "$rootdir" chmod +x /root/npm_install.sh
|
581
|
|
- chroot "$rootdir" /root/npm_install.sh
|
|
585
|
+ chroot "$rootdir" /root/npm_install.sh $NPM_VERSION
|
582
|
586
|
|
583
|
587
|
git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork
|
584
|
588
|
|