Explorar el Código

Check for presence of node

Bob Mottram hace 7 años
padre
commit
1fd767b7c3
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7
    2
      src/freedombone-image-customise

+ 7
- 2
src/freedombone-image-customise Ver fichero

565
     chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl
565
     chroot "$rootdir" apt-get -yq install g++ m4 libtool automake nodejs curl
566
     chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev
566
     chroot "$rootdir" apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev
567
 
567
 
568
-    chroot "$rootdir" which node
569
-    chroot "$rootdir" which nodejs
568
+    if [ -f $rootdir/usr/bin/nodejs ]; then
569
+        cp $rootdir/usr/bin/nodejs $rootdir/usr/bin/node
570
+    fi
571
+    if [ ! -f $rootdir/usr/bin/node ]; then
572
+        echo $'/usr/bin/node not found'
573
+        exit 7235728
574
+    fi
570
     wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
575
     wget https://www.npmjs.com/install.sh -O $rootdir/root/npm_install.sh
571
     if [ ! -f $rootdir/root/npm_install.sh ]; then
576
     if [ ! -f $rootdir/root/npm_install.sh ]; then
572
         echo $'Unable to download npm installer'
577
         echo $'Unable to download npm installer'