| 1 |
#!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
export TMPDIR=$(mktempscip-shell system . . mktemp. -d -p "$PWD") |
| 6 |
export XDG_CONFIG_HOME="$TMPDIR/config" |
| 7 |
export XDG_CACHE_HOME="$TMPDIR/cache" |
| •8 |
export XDG_RUNTIME_DIR="$TMPDIR/run" |
| 9 |
export GSETTINGS_SCHEMA_DIR="$TMPDIR/schemas" |
| •10 |
mkdirscip-shell system . . mkdir. -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $GSETTINGS_SCHEMA_DIR $XDG_RUNTIME_DIR |
| 11 |
|
| 12 |
trap cleanup EXIT |
| 13 |
|
| 14 |
cleanupscip-shell shell ibus 1.5.34-1 cleanup().() { |
| 15 |
testscip-shell system . . test. $? -eq 0 && exit |
| •16 |
rmscip-shell system . . rm. -rf $TMPDIR |
| 17 |
} |
| 18 |
|
| 19 |
# in case that schema is not installed on the system |
| •20 |
dbus-run-session -- glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD" |
| 21 |
|
| 22 |
catscip-shell system . . cat. <<EOF |
| 23 |
# This file is a part of the IBus packaging and should not be changed. |
| 24 |
# |
| 25 |
# Instead create your own file next to it with a higher numbered prefix, |
| 26 |
# and run |
| 27 |
# |
| 28 |
# dconf update |
| 29 |
# |
| 30 |
EOF |
| 31 |
|
| 32 |
# Loop over top level schemas since "gsettings list-recursively" only |
| 33 |
# looks for direct children. |
| 34 |
schemas="org.freedesktop.ibus.general org.freedesktop.ibus.panel" |
| 35 |
current_schema= |
| 36 |
for schema in $schemas; do |
| •37 |
dbus-run-session -- gsettings list-recursively $schema | \ |
| 38 |
while read schema key val; do |
| 39 |
if testscip-shell system . . test. "$schema" != "$current_schema"; then |
| 40 |
echoscip-shell system . . echo. |
| 41 |
echoscip-shell system . . echo. $schema | sedscip-shell system . . sed. 's/org\.freedesktop\(.*\)/[desktop\1]/' | trscip-shell system . . tr. '.' '/scip-shell filesystem . . `/`.' |
| 42 |
current_schema="$schema" |
| 43 |
fi |
| 44 |
echoscip-shell system . . echo. "$key=$val" |
| 45 |
done |
| 46 |
done |
| 47 |
|
| 48 |
# dbus-launch and gsettings run /usr/lib*/gvfsd-fuse $TMPDIR/cache/gvfs -f |
| 49 |
# via systemd since gvfs 1.45.90 in Fedora 33 |
| 50 |
# and rm $TMPDIR could be failed until umount would be called. |
| 51 |
if [scip-shell system . . `[`. -d $TMPDIR/cache/gvfs ] ; then |
| 52 |
umountscip-shell system . . umount. $TMPDIR/cache/gvfs |
| 53 |
fi |
| 54 |
rmscip-shell system . . rm. -rf $TMPDIR |