File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if [ ! -d /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts ]; then
4+ echo " Missing directory, create it manually then try again:"
5+ echo " sudo mkdir -p /usr/lib/mozilla/native-messaging-hosts"
6+ exit 1
7+ fi
8+
9+ cp $SNAP /lib/org.jabref.jabref.json /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if [ ! -f /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json ]; then
4+ exit 0
5+ elif grep --quiet ' "path": "/snap' /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json; then
6+ rm /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json
7+ fi
Original file line number Diff line number Diff line change 11name : jabref
2- # adopt-info: jabref
3- version : ' master'
4- version-script : cat build.gradle | grep "^version =" | cut -d'"' -f2
2+ adopt-info : jabref
53icon : snap/gui/jabref.png
64license : MIT
75summary : Bibliography manager
@@ -14,6 +12,14 @@ license: MIT
1412architectures :
1513 - build-on : amd64
1614
15+ plugs :
16+ browser-extension :
17+ interface : system-files
18+ read :
19+ - /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts
20+ write :
21+ - /var/lib/snapd/hostfs/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json
22+
1723apps :
1824 jabref :
1925 command : bin/JabRef
@@ -34,8 +40,12 @@ parts:
3440 jabref :
3541 plugin : dump
3642 source : build/distribution/JabRef-portable_linux.tar.gz
37- # override-pull: |
38- # snapcraftctl pull
39- # snapcraftctl set-version "$(cat app/JabRef.cfg | grep "app.version=" | cut -d'=' -f2)"
43+ # Use this source for debug purposes:
44+ # source: https://builds.jabref.org/master/JabRef-portable_linux.tar.gz
4045 stage-packages :
4146 - x11-utils
47+ override-build : |
48+ snapcraftctl build
49+ snapcraftctl set-version "$(cat $SNAPCRAFT_PART_INSTALL/lib/app/JabRef.cfg | grep "app.version=" | cut -d'=' -f2)"
50+ sed -i 's|/opt/jabref/lib/jabrefHost.py|/snap/jabref/current/lib/jabrefHost.py|g' $SNAPCRAFT_PART_INSTALL/lib/org.jabref.jabref.json
51+
You can’t perform that action at this time.
0 commit comments