Bob Mottram преди 7 години
родител
ревизия
cd143fdefc
променени са 2 файла, в които са добавени 10 реда и са изтрити 6 реда
  1. 9
    5
      src/freedombone-image-customise
  2. 1
    1
      src/freedombone-utils-nodejs

+ 9
- 5
src/freedombone-image-customise Целия файл

572
         echo $'/usr/bin/node not found'
572
         echo $'/usr/bin/node not found'
573
         exit 7235728
573
         exit 7235728
574
     fi
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
     fi
583
     fi
580
     chroot "$rootdir" chmod +x /root/npm_install.sh
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
     git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork
587
     git clone https://github.com/ssbc/patchwork $rootdir/etc/patchwork
584
 
588
 

+ 1
- 1
src/freedombone-utils-nodejs Целия файл

35
 
35
 
36
 # change these versions at your peril. Things will often crash if you don't
36
 # change these versions at your peril. Things will often crash if you don't
37
 # have specifically the correct versions
37
 # have specifically the correct versions
38
-NODEJS_VERSION='6.10.1'
38
+NODEJS_VERSION='6.11.3'
39
 NODEJS_N_VERSION='2.1.7'
39
 NODEJS_N_VERSION='2.1.7'
40
 NPM_VERSION='4.0.5'
40
 NPM_VERSION='4.0.5'
41
 
41