summaryrefslogtreecommitdiffstats
path: root/lib/gajim/settings-clean-sub-account-settings
blob: 43e9ca9b4c49f081ed612d769191b90e57bd3120 (plain)
1
2
3
4
5
6
7
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}"