Skip to content

Commit fa25ee9

Browse files
LyzardKingtobiasdiez
authored andcommitted
Fix destination for jabref mozilla json (#5503)
* Fix destination for jabref mozilla json * Check if json native extension file exists
1 parent d3a5ea7 commit fa25ee9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

buildres/linux/postinst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ set -e
1919

2020
case "$1" in
2121
configure)
22-
INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts/"
23-
install -D -m0755 /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH
22+
INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts"
23+
install -D -m0755 /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH/org.jabref.jabref.json
2424
DESKTOP_COMMANDS_INSTALL
2525
;;
2626

buildres/linux/postrm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ set -e
1818
# the debian-policy package
1919
case "$1" in
2020
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
21-
INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts"
22-
if grep --quiet '"path": "/opt' $INSTALL_PATH/org.jabref.jabref.json; then
23-
rm $INSTALL_PATH/org.jabref.jabref.json
21+
NATIVE_MESSAGING_JSON="/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json"
22+
if [ -e $NATIVE_MESSAGING_JSON ] && grep --quiet '"path": "/opt' $NATIVE_MESSAGING_JSON; then
23+
rm $NATIVE_MESSAGING_JSON
2424
fi
2525
;;
2626

0 commit comments

Comments
 (0)