diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 09:06:59 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 09:06:59 +0200 |
commit | 4ea2cc3bd4a7d9b1c54a9d33e6a1cf82e7c8c21d (patch) | |
tree | d2e54377d14d604356c86862a326f64ae64dadd6 /settings-migrator |
Imported Upstream version 0.18.1upstream/0.18.1
Diffstat (limited to 'settings-migrator')
-rw-r--r-- | settings-migrator/shotwell-settings-migrator | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/settings-migrator/shotwell-settings-migrator b/settings-migrator/shotwell-settings-migrator new file mode 100644 index 0000000..9bb40eb --- /dev/null +++ b/settings-migrator/shotwell-settings-migrator @@ -0,0 +1,33 @@ +#!/bin/sh + +################################################################################ +# +# Copyright 2012-2014 Yorba Foundation +# +# This software is licensed under the GNU LGPL (version 2.1 or later). +# See the COPYING file in this distribution. +# +# Helper script to copy settings data from /apps/shotwell/ to +# /org/yorba/shotwell/ +# +# NOTE: this should only be run ONCE as part of the upgrade process; otherwise, +# any stale data in the old location may be inadvertently copied over again, +# overwriting newer data. +# +################################################################################ + +sec_since_epoch=`date +%s` +temp_file_path_prefix=/tmp/shotwell-migrate-settings-path- +temp_file_path=$temp_file_path_prefix$sec_since_epoch + +# Copy from deprecated path... +dconf dump /apps/shotwell/ > $temp_file_path + +# ...and into officially-blessed one. +dconf load /org/yorba/shotwell/ < $temp_file_path + +# Clean out the stale paths... +dconf reset -f /apps/shotwell/ + +# temp file not needed anymore, zap it. +rm -f $temp_file_path |