Support restoring dconf.

This commit is contained in:
David Tomaschik
2018-07-08 13:56:37 -07:00
parent 8d9cf14608
commit da545f0de7
2 changed files with 35 additions and 0 deletions

View File

@@ -348,6 +348,13 @@ install_main() {
cleanup
}
install_dconf() {
which dconf >/dev/null 2>&1 || return 1
find "${BASEDIR}/dconf" -type f -printf '/%P\n' | while read dcpath ; do
dconf load ${dcpath}/ < "${BASEDIR}/dconf/${dcpath}"
done
}
# Setup variables
read_saved_prefs
@@ -401,6 +408,10 @@ case $OPERATION in
# Do nothing, just sourcing
set +o errexit
;;
dconf)
# Load dconf
install_dconf
;;
*)
echo "Unknown operation $OPERATION." >/dev/stderr
exit 1