Debian Codegraph @

data/dconf/make-dconf-override-db.sh

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 #!/bin/sh
2
3 set -e
4
5 # gnome-continuous doesn't have a machine-id set, which
6 # breaks dbus-launch. There's dbus-run-session which is
7 # better, but not everyone has it yet.
8 export DBUS_FATAL_WARNINGS=0
9 export TMPDIR=$(mktemp -d -p "$PWD")
10 export XDG_CONFIG_HOME="$TMPDIR/config"
11 export XDG_CACHE_HOME="$TMPDIR/cache"
12 export GSETTINGS_SCHEMA_DIR="$TMPDIR/schemas"
13 mkdir -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $GSETTINGS_SCHEMA_DIR
14
15 eval `dbus-launch --sh-syntax`
16
17 trap cleanup EXIT
18
19 cleanup() {
20 test $? -eq 0 && exit
21 rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID
22 }
23
24 # in case that schema is not installed on the system
25 glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD"
26
27 cat <<EOF
28 # This file is a part of the IBus packaging and should not be changed.
29 #
30 # Instead create your own file next to it with a higher numbered prefix,
31 # and run
32 #
33 # dconf update
34 #
35 EOF
36
37 # Loop over top level schemas since "gsettings list-recursively" only
38 # looks for direct children.
39 schemas="org.freedesktop.ibus.general org.freedesktop.ibus.panel"
40 current_schema=
41 for schema in $schemas; do
42 gsettings list-recursively $schema | \
43 while read schema key val; do
44 if test "$schema" != "$current_schema"; then
45 echo
46 echo $schema | sed 's/org\.freedesktop\(.*\)/[desktop\1]/' | tr '.' '/'
47 current_schema="$schema"
48 fi
49 echo "$key=$val"
50 done
51 done
52
53 # dbus-launch and gsettings run /usr/lib*/gvfsd-fuse $TMPDIR/cache/gvfs -f
54 # via systemd since gvfs 1.45.90 in Fedora 33
55 # and rm $TMPDIR could be failed until umount would be called.
56 if [ -d $TMPDIR/cache/gvfs ] ; then
57 umount $TMPDIR/cache/gvfs
58 fi
59 rm -rf $TMPDIR
60
61 kill $DBUS_SESSION_BUS_PID