mirror of
https://github.com/chatmail/core.git
synced 2026-04-05 23:22:11 +03:00
The motivation is to reduce code complexity, get rid of the extra IMAP connection and cases when messages are added to chats by Inbox and Sentbox loops in parallel which leads to various message sorting bugs, particularly to outgoing messages breaking sorting of incoming ones which are fetched later, but may have a smaller "Date".
23 lines
646 B
Bash
Executable File
23 lines
646 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Updates provider database.
|
|
# Returns 1 if the database is changed, 0 otherwise.
|
|
set -euo pipefail
|
|
|
|
export TZ=UTC
|
|
|
|
# Provider database revision.
|
|
REV=d041136c19a48b493823b46d472f12b9ee94ae80
|
|
|
|
CORE_ROOT="$PWD"
|
|
TMP="$(mktemp -d)"
|
|
git clone --filter=blob:none https://github.com/deltachat/provider-db.git "$TMP"
|
|
cd "$TMP"
|
|
git checkout "$REV"
|
|
DATE=$(git show -s --format=%cs)
|
|
"$CORE_ROOT"/scripts/create-provider-data-rs.py "$TMP/_providers" "$DATE" >"$CORE_ROOT/src/provider/data.rs"
|
|
rustfmt --edition 2024 "$CORE_ROOT/src/provider/data.rs"
|
|
rm -fr "$TMP"
|
|
|
|
cd "$CORE_ROOT"
|
|
test -z "$(git status --porcelain src/provider/data.rs)"
|