瀏覽代碼

Getting nodejs repo gpg key

Bob Mottram 8 年之前
父節點
當前提交
7c029463c4
共有 1 個檔案被更改,包括 11 行新增0 行删除
  1. 11
    0
      src/freedombone-utils-nodejs

+ 11
- 0
src/freedombone-utils-nodejs 查看文件

45
 
45
 
46
 function mesh_install_nodejs {
46
 function mesh_install_nodejs {
47
     # Note: this has to be jessie for now
47
     # Note: this has to be jessie for now
48
+    if [ ! -d ${rootdir}/$INSTALL_DIR ]; then
49
+        mkdir ${rootdir}/$INSTALL_DIR
50
+    fi
51
+    chroot "${rootdir}" wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > $INSTALL_DIR/node.gpg.key
52
+    chroot "${rootdir}" apt-key add $INSTALL_DIR/node.gpg.key
48
     echo "deb https://deb.nodesource.com/node_7.x jessie main" > ${rootdir}/etc/apt/sources.list.d/nodesource.list
53
     echo "deb https://deb.nodesource.com/node_7.x jessie main" > ${rootdir}/etc/apt/sources.list.d/nodesource.list
49
     echo "deb-src https://deb.nodesource.com/node_7.x jessie main" >> ${rootdir}/etc/apt/sources.list.d/nodesource.list
54
     echo "deb-src https://deb.nodesource.com/node_7.x jessie main" >> ${rootdir}/etc/apt/sources.list.d/nodesource.list
50
     chroot "${rootdir}" apt-get update
55
     chroot "${rootdir}" apt-get update
146
     fi
151
     fi
147
 
152
 
148
     # Note: this has to be jessie for now
153
     # Note: this has to be jessie for now
154
+    if [ ! -d $INSTALL_DIR ]; then
155
+        mkdir $INSTALL_DIR
156
+    fi
157
+    cd $INSTALL_DIR
158
+    wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > $INSTALL_DIR/node.gpg.key
159
+    apt-key add $INSTALL_DIR/node.gpg.key
149
     echo "deb https://deb.nodesource.com/node_7.x jessie main" > /etc/apt/sources.list.d/nodesource.list
160
     echo "deb https://deb.nodesource.com/node_7.x jessie main" > /etc/apt/sources.list.d/nodesource.list
150
     echo "deb-src https://deb.nodesource.com/node_7.x jessie main" >> /etc/apt/sources.list.d/nodesource.list
161
     echo "deb-src https://deb.nodesource.com/node_7.x jessie main" >> /etc/apt/sources.list.d/nodesource.list
151
 
162