From 8bc5ca4d9de1f2cd72d53be211666b0ddee4a014 Mon Sep 17 00:00:00 2001 From: Galileo Sartor Date: Wed, 23 Oct 2019 12:03:37 +0200 Subject: [PATCH 1/2] Fix destination for jabref mozilla json --- buildres/linux/postinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildres/linux/postinst b/buildres/linux/postinst index 40791c02384..ea5525ebd03 100644 --- a/buildres/linux/postinst +++ b/buildres/linux/postinst @@ -19,8 +19,8 @@ set -e case "$1" in configure) - INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts/" - install -D -m0755 /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH + INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts" + install -D -m0755 /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH/org.jabref.jabref.json DESKTOP_COMMANDS_INSTALL ;; From cd0dccd47d8e484f0d6ed63d55c11ed48fabbc64 Mon Sep 17 00:00:00 2001 From: Galileo Sartor Date: Wed, 23 Oct 2019 15:20:09 +0200 Subject: [PATCH 2/2] Check if json native extension file exists --- buildres/linux/postrm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildres/linux/postrm b/buildres/linux/postrm index 7cb08bc3746..2cd3bfb9079 100644 --- a/buildres/linux/postrm +++ b/buildres/linux/postrm @@ -18,9 +18,9 @@ set -e # the debian-policy package case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts" - if grep --quiet '"path": "/opt' $INSTALL_PATH/org.jabref.jabref.json; then - rm $INSTALL_PATH/org.jabref.jabref.json + NATIVE_MESSAGING_JSON="/usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json" + if [ -e $NATIVE_MESSAGING_JSON ] && grep --quiet '"path": "/opt' $NATIVE_MESSAGING_JSON; then + rm $NATIVE_MESSAGING_JSON fi ;;