浏览代码

links to nodejs

Bob Mottram 8 年前
父节点
当前提交
ce210932fd
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16
    0
      src/freedombone-app-ipfs

+ 16
- 0
src/freedombone-app-ipfs 查看文件

@@ -210,6 +210,14 @@ function mesh_install_ipfs_js {
210 210
     chroot ${rootdir} apt-get -y install npm
211 211
     chroot ${rootdir} apt-get -y install libpam0g-dev fuse
212 212
 
213
+    if [ ! -f ${rootdir}/usr/bin/nodejs ]; then
214
+        echo $'nodejs was not installed'
215
+        exit 63962
216
+    fi
217
+
218
+    chroot ${rootdir} ln -s /usr/bin/nodejs /usr/bin/node
219
+    chroot ${rootdir} ln -s /usr/bin/nodejs /usr/local/bin/node
220
+
213 221
     chroot ${rootdir} npm cache clean -f
214 222
     chroot ${rootdir} npm install -g n
215 223
     chroot ${rootdir} n ${IPFS_NODE_VERSION}
@@ -278,6 +286,14 @@ function install_ipfs_js {
278 286
     apt-get -y install npm
279 287
     apt-get -y install libpam0g-dev fuse
280 288
 
289
+    if [ ! -f /usr/bin/nodejs ]; then
290
+        echo $'nodejs was not installed'
291
+        exit 63962
292
+    fi
293
+
294
+    ln -s /usr/bin/nodejs /usr/bin/node
295
+    ln -s /usr/bin/nodejs /usr/local/bin/node
296
+
281 297
     npm cache clean -f
282 298
     npm install -g n
283 299
     n ${IPFS_NODE_VERSION}