Blame SOURCES/flatpak-evolution-wrapper.sh.in

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