瀏覽代碼

Don't try to install global packages as a local user

Bob Mottram 7 年之前
父節點
當前提交
12c690abd5
共有 1 個檔案被更改,包括 14 行新增6 行删除
  1. 14
    6
      src/freedombone-app-scuttlebot

+ 14
- 6
src/freedombone-app-scuttlebot 查看文件

395
 if ! npm install --arch=$NPM_ARCH scuttlebot@${SCUTTLEBOT_VERSION}; then
395
 if ! npm install --arch=$NPM_ARCH scuttlebot@${SCUTTLEBOT_VERSION}; then
396
     exit 2
396
     exit 2
397
 fi
397
 fi
398
-if ! npm install --arch=$NPM_ARCH -g git-ssb; then
399
-    exit 3
400
-fi
401
-if ! npm install --arch=$NPM_ARCH -g git-remote-ssb; then
402
-    exit 4
403
-fi
404
 exit 0
398
 exit 0
405
 EOF
399
 EOF
406
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_scuttlebot
400
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_scuttlebot
412
         exit 528253
406
         exit 528253
413
     fi
407
     fi
414
 
408
 
409
+    cat <<EOF > "$rootdir/usr/bin/install_git_ssb"
410
+#!/bin/bash
411
+if ! npm install --arch=$NPM_ARCH -g git-ssb; then
412
+    exit 1
413
+fi
414
+if ! npm install --arch=$NPM_ARCH -g git-remote-ssb; then
415
+    exit 2
416
+fi
417
+exit 0
418
+EOF
419
+    chroot "$rootdir" /bin/chmod +x /usr/bin/install_git_ssb
420
+    chroot "$rootdir" /usr/bin/install_git_ssb
421
+    rm "$rootdir/usr/bin/install_git_ssb"
422
+
415
     # daemon
423
     # daemon
416
     { echo '[Unit]';
424
     { echo '[Unit]';
417
       echo 'Description=Scuttlebot (messaging system)';
425
       echo 'Description=Scuttlebot (messaging system)';