From 7119628463c447033ff9ac00fe30f449b5069ae4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rub=C3=A9n=20Rodr=C3=ADguez?= <ruben@trisquel.info>
Date: Mon, 18 Mar 2013 20:54:59 +0100
Subject: [PATCH] Add profile migration script to trisquel-wm

---
 helpers/make-gnome-session | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/helpers/make-gnome-session b/helpers/make-gnome-session
index 1aaffb9c..58d100ed 100644
--- a/helpers/make-gnome-session
+++ b/helpers/make-gnome-session
@@ -17,7 +17,7 @@
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 #
 
-VERSION=9
+VERSION=10
 COMPONENT=main
 QUILT=skip
 
@@ -42,6 +42,20 @@ EOF
 cat << EOF > debian/scripts/trisquel-wm
 #!/bin/sh
 
+# Migrate the profile if needed
+[ -f ~/.config/profilemigrated ] || touch ~/.config/profilemigrated
+if ! grep $(lsb_release -r -s) -q ~/.config/profilemigrated ; then
+  rm ~/.cache/compiz* ~/.compiz* ~/.config/compiz*  -rf
+  for key in /apps/panel /apps/compiz /apps/compiz-1 /apps/compizconfig-1 /apps/compizconfig
+  do
+      gconftool --recursive-unset $key
+  done
+gsettings reset-recursively org.gnome.gnome-panel
+gnome-panel --replace
+
+lsb_release -r -s > ~/.config/profilemigrated
+fi
+
 WM=compiz
 FALLBACK=openbox
 which metacity && FALLBACK=metacity
-- 
GitLab