Try permissions option

This commit is contained in:
Bob Mottram 2018-04-12 22:51:03 +01:00
parent 1f6546d464
commit a67fc56d8c
1 changed files with 4 additions and 6 deletions

View File

@ -402,16 +402,14 @@ function mesh_install_scuttlebot {
cat <<EOF > "$rootdir/usr/bin/install_scuttlebot"
#!/bin/bash
chown -R $(whoami):$(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
chown -R $(whoami):$(whoami) ~/.npm
if ! npm install --arch=$NPM_ARCH -g scuttlebot@${SCUTTLEBOT_VERSION}; then
exit 2
if ! npm install --unsafe-perm --verbose --arch=$NPM_ARCH -g scuttlebot@${SCUTTLEBOT_VERSION}; then
exit 1
fi
if ! npm install --arch=$NPM_ARCH -g git-ssb; then
exit 3
exit 2
fi
if ! npm install --arch=$NPM_ARCH -g git-remote-ssb; then
exit 4
exit 3
fi
EOF
chroot "$rootdir" /bin/chmod +x /usr/bin/install_scuttlebot