diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-08-25 17:46:48 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-08-25 19:17:18 (EDT) |
commit | f28e5ea9263e31005ee6cf245e33b25afd5052e4 (patch) | |
tree | 0208ac00e7490f19bd9fe3ad547fc6f0d585822d /lib/gajim/settings-clean-sub-account-settings | |
parent | 1dc221b4b8fd408642b6f85d5736afb41557e5e4 (diff) | |
download | gajim-f28e5ea9263e31005ee6cf245e33b25afd5052e4.zip gajim-f28e5ea9263e31005ee6cf245e33b25afd5052e4.tar.gz gajim-f28e5ea9263e31005ee6cf245e33b25afd5052e4.tar.bz2 |
lib/gajim/settings-*: New scripts
bin/sqlite3-git-* were more general-purpose scripts in the vcsh dotfiles
repository. These scripts are specific for Gajim and use sqlite3 and jq
to clean settings.sqlite.
Diffstat (limited to 'lib/gajim/settings-clean-sub-account-settings')
-rwxr-xr-x | lib/gajim/settings-clean-sub-account-settings | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gajim/settings-clean-sub-account-settings b/lib/gajim/settings-clean-sub-account-settings new file mode 100755 index 0000000..43e9ca9 --- /dev/null +++ b/lib/gajim/settings-clean-sub-account-settings @@ -0,0 +1,8 @@ +#!/bin/sh + +set -eu + +clean="$(jq \ + 'del(.contact[], .group_chat[]) | .account.opened_chat_controls = ""' \ + "${1}" | sed -n '1h; 1!H; ${ g; s/,\n */, /g; s/\n *//g; p; };')" +printf '%s' "${clean}" 1>"${1}" |