Trying to upload all related projects
[easy-deb-chroot] / diablo / easy-deb-chroot / control / preinst
diff --git a/diablo/easy-deb-chroot/control/preinst b/diablo/easy-deb-chroot/control/preinst
new file mode 100644 (file)
index 0000000..3bcd200
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Preserve old powerlaunch settings
+if [ -d "/home/user/.powerlaunch" ]  &&  [ ! -f "/home/user/.powerlaunch/powerlaunch.conf.orig" ] ; then
+    mv /home/user/.powerlaunch/powerlaunch.conf /home/user/.powerlaunch/powerlaunch.conf.orig
+fi
+# I sincerely apologise for the following ugly kludge that
+# backs up all previous settings.
+
+if  [ -f "/home/user/.chroot" ] ; then
+  cp /home/user/.chroot /home/user/.chroot.orig
+fi
+
+if  [ -f "/home/user/.Xmodmap-keymap" ] ; then
+  cp /home/user/.Xmodmap-keymap /home/user/.Xmodmap-keymap.orig
+fi
+
+if  [ -f "/home/user/.xbindkeysrc.scm" ] ; then
+  cp /home/user/.xbindkeysrc.scm /home/user/.xbindkeysrc.scm.orig
+fi
+
+if  [ -f "/home/user/.gimp-2.4/gimprc" ] ; then
+  cp /home/user/.gimp-2.4/gimprc /home/user/.gimp-2.4/gimprc.orig
+fi
+
+if  [ -f "/home/user/.gimp-2.4/sessionrc" ] ; then
+  cp /home/user/.gimp-2.4/sessionrc /home/user/.gimp-2.4/sessionrc.orig
+fi
+
+if  [ -f "/home/user/.config/lxde/config" ] ; then
+  cp /home/user/.config/lxde/config /home/user/.config/lxde/config.orig
+fi
+
+if  [ -f "/home/user/.config/lxpanel/LXDE/config" ] ; then
+  cp /home/user/.config/lxpanel/LXDE/config /home/user/.config/lxpanel/LXDE/config.orig
+fi
+
+if  [ -f "/home/user/.config/lxpanel/LXDE/panels/panel" ] ; then
+  cp /home/user/.config/lxpanel/LXDE/panels/panel /home/user/.config/lxpanel/LXDE/panels/panel.orig
+fi
+
+if  [ -f "/home/user/.config/gtk-2.0/gtkfilechooser.ini" ] ; then
+  cp /home/user/.config/gtk-2.0/gtkfilechooser.ini /home/user/.config/gtk-2.0/gtkfilechooser.ini.orig
+fi
+
+exit 0