#!/bin/sh

if [ ! -f /etc/opt/edge/native-messaging-hosts/org.jabref.jabref.json ]; then
    exit 0
elif grep --quiet '"path": "/snap' /etc/opt/edge/native-messaging-hosts/org.jabref.jabref.json; then
    rm /etc/opt/edge/native-messaging-hosts/org.jabref.jabref.json
fi