From f28e5ea9263e31005ee6cf245e33b25afd5052e4 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 25 Aug 2021 17:46:48 -0400 Subject: 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. --- (limited to 'lib/gajim/settings-clean-sub-account-settings') 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}" -- cgit v0.9.1