Skip to content

Commit

Permalink
Fix destination for jabref mozilla json (#5503)
Browse files Browse the repository at this point in the history
* Fix destination for jabref mozilla json

* Check if json native extension file exists
  • Loading branch information
LyzardKing authored and tobiasdiez committed Oct 27, 2019
1 parent d3a5ea7 commit fa25ee9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions buildres/linux/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;

Expand Down
6 changes: 3 additions & 3 deletions buildres/linux/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;

Expand Down

0 comments on commit fa25ee9

Please sign in to comment.