Skip to content

Commit

Permalink
Fix hook name and permission
Browse files Browse the repository at this point in the history
  • Loading branch information
LyzardKing committed Oct 10, 2019
1 parent 59bc362 commit 7e2c000
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
9 changes: 9 additions & 0 deletions snap/hooks/connect-plug-jabfox-integration
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

if [ ! -d /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts ]; then
echo "Missing directory, create it manually then try again:"
echo "sudo mkdir -p /usr/lib/mozilla/native-messaging-hosts"
exit 1
fi

cp $SNAP/lib/org.jabref.jabref.json /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json
3 changes: 0 additions & 3 deletions snap/hooks/jabfox-interface

This file was deleted.

13 changes: 5 additions & 8 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ architectures:
plugs:
jabfox-integration:
interface: system-files
read:
- /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts
write:
- /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json

hooks:
connect-plug-system-files:
plugs:
- jabfox-integration
- /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json

apps:
jabref:
Expand All @@ -42,9 +39,9 @@ apps:
parts:
jabref:
plugin: dump
# source: build/distribution/JabRef-portable_linux.tar.gz
source: build/distribution/JabRef-portable_linux.tar.gz
# Use this source for debug purposes:
source: https://builds.jabref.org/master/JabRef-portable_linux.tar.gz
# source: https://builds.jabref.org/master/JabRef-portable_linux.tar.gz
stage-packages:
- x11-utils
override-build: |
Expand Down

0 comments on commit 7e2c000

Please sign in to comment.