浏览代码

Fix wget for nodejs repo key

Bob Mottram 7 年前
父节点
当前提交
146d88d3cf
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      src/freedombone-utils-nodejs

+ 5
- 1
src/freedombone-utils-nodejs 查看文件

@@ -71,7 +71,11 @@ function mesh_install_nodejs {
71 71
 
72 72
     $mesh_install_nodejs_prefix apt-get -qy install wget curl g++ m4 libtool automake
73 73
     $mesh_install_nodejs_prefix apt-get -yq install libxext-dev libxtst-dev libxkbfile-dev
74
-    $mesh_install_nodejs_prefix wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /root/node.gpg.key
74
+    $mesh_install_nodejs_prefix wget https://deb.nodesource.com/gpgkey/nodesource.gpg.key -O /root/node.gpg.key
75
+    if [ ! -f $rootdir/root/node.gpg.key ]; then
76
+        echo $'Unable to obtain gpg key for nodejs repo'
77
+        exit 6389252
78
+    fi
75 79
     $mesh_install_nodejs_prefix apt-key add /root/node.gpg.key
76 80
     echo "deb https://deb.nodesource.com/node_6.x stretch main" > $rootdir/etc/apt/sources.list.d/nodesource.list
77 81
     echo "deb-src https://deb.nodesource.com/node_6.x stretch main" >> $rootdir/etc/apt/sources.list.d/nodesource.list