ソースを参照

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,6 +45,11 @@ NODEJS_INSTALLED_APPS_FILE=$HOME/.nodejs-apps
45 45
 
46 46
 function mesh_install_nodejs {
47 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 53
     echo "deb https://deb.nodesource.com/node_7.x jessie main" > ${rootdir}/etc/apt/sources.list.d/nodesource.list
49 54
     echo "deb-src https://deb.nodesource.com/node_7.x jessie main" >> ${rootdir}/etc/apt/sources.list.d/nodesource.list
50 55
     chroot "${rootdir}" apt-get update
@@ -146,6 +151,12 @@ function install_nodejs {
146 151
     fi
147 152
 
148 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 160
     echo "deb https://deb.nodesource.com/node_7.x jessie main" > /etc/apt/sources.list.d/nodesource.list
150 161
     echo "deb-src https://deb.nodesource.com/node_7.x jessie main" >> /etc/apt/sources.list.d/nodesource.list
151 162