Bläddra i källkod

exports before installing git-ssb

Bob Mottram 7 år sedan
förälder
incheckning
0ce090ab8b
2 ändrade filer med 5 tillägg och 0 borttagningar
  1. 4
    0
      src/freedombone-app-scuttlebot
  2. 1
    0
      src/freedombone-utils-nodejs

+ 4
- 0
src/freedombone-app-scuttlebot Visa fil

409
 
409
 
410
     cat <<EOF > "$rootdir/usr/bin/install_git_ssb"
410
     cat <<EOF > "$rootdir/usr/bin/install_git_ssb"
411
 #!/bin/bash
411
 #!/bin/bash
412
+npm config set prefix '~/.npm-global'
413
+export PATH=~/.npm-global/bin:$PATH
414
+export NPM_CONFIG_PREFIX=~/.npm-global
415
+source ~/.profile
412
 if ! npm install --arch=$NPM_ARCH -g git-ssb; then
416
 if ! npm install --arch=$NPM_ARCH -g git-ssb; then
413
     exit 1
417
     exit 1
414
 fi
418
 fi

+ 1
- 0
src/freedombone-utils-nodejs Visa fil

256
     echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
256
     echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
257
 fi
257
 fi
258
 export NPM_CONFIG_PREFIX=~/.npm-global
258
 export NPM_CONFIG_PREFIX=~/.npm-global
259
+echo 'export NPM_CONFIG_PREFIX=~/.npm-global' >> ~/.bashrc
259
 source ~/.profile
260
 source ~/.profile
260
 EOF
261
 EOF
261
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_npm_global
262
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_npm_global