evolution/flatpak-evolution-wrapper.sh.in
Petr Šabata 75094a0014 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/evolution#40034cda8ceae573f1d30caf7a342b35e8f7d39c
2020-10-15 00:07:18 +02:00

34 lines
1.4 KiB
Bash

#!/bin/bash
if [ "$1" = "--quit" -o "$1" = "--force-shutdown" ]; then
/app/bin/evolution.bin "$@"
else
export BOGOFILTER_DIR="${XDG_DATA_HOME}/bogofilter/"
export GIO_USE_NETWORK_MONITOR=base
gsettings reset org.gnome.evolution-data-server network-monitor-gio-name
gpg-agent --homedir ~/.gnupg --daemon --pinentry-program=/app/bin/pinentry
LINES=$(gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep @SOURCES_SERVICE@ | wc -l)
if [ "${LINES}" = "0" ]; then
/app/libexec/evolution-source-registry &
gdbus wait --session --timeout=1@TIMEOUTMULT@ @SOURCES_SERVICE@
fi
LINES=$(gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep @ADDRESSBOOK_SERVICE@ | wc -l)
if [ "${LINES}" = "0" ]; then
/app/libexec/evolution-addressbook-factory -r &
gdbus wait --session --timeout=1@TIMEOUTMULT@ @ADDRESSBOOK_SERVICE@
fi
LINES=$(gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep @CALENDAR_SERVICE@ | wc -l)
if [ "${LINES}" = "0" ]; then
/app/libexec/evolution-calendar-factory -r &
gdbus wait --session --timeout=1@TIMEOUTMULT@ @CALENDAR_SERVICE@
fi
/app/bin/evolution.bin "$@"
pkill -TERM gpg-agent
fi