Commit 969156aaa7db0b2419b544c9a6a440eed6b1d32c

Authored by Silvan Calarco
1 parent 0167393c1b
Exists in master

Add kde5-migrate-user-conf script for kde4->kde5 config files migration

Showing 2 changed files with 45 additions and 3 deletions Side-by-side Diff

1 1 # Makefile for openmamba-desktop-kde4
2   -# Copyright (C) 2004-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
  2 +# Copyright (C) 2004-2016 by Silvan Calarco <silvan.calarco@mambasoft.it>
3 3 # Copyright (C) 2005-2007 by Davide Madrisan <davide.madrisan@gmail.com>
4 4  
5 5 include VERSION
... ... @@ -35,7 +35,6 @@
35 35 initrddir = ${sysconfdir}/rc.d/init.d
36 36 mandir = ${prefix}/usr/share/man
37 37 sysconfigdir= ${sysconfdir}/sysconfig
38   -xprofiledir = ${sysconfdir}/xprofile.d
39 38 mambabasedatadir = ${datadir}/openmamba/mambabase
40 39 mambawelcomedatadir = ${datadir}/openmamba/mambawelcome
41 40 bootrecoverdatadir = ${datadir}/openmamba/bootrecover
... ... @@ -140,7 +139,6 @@
140 139 @$(INSTALL_DIR) $(DESTDIR)$(kde5configdir)
141 140 @$(INSTALL_DIR) $(DESTDIR)$(kdewallpapersdir)
142 141 @$(INSTALL_DIR) $(DESTDIR)$(kdeplasmadesktopupdatesdir)
143   - @$(INSTALL_DIR) $(DESTDIR)$(xprofiledir)
144 142 @$(INSTALL_DIR) $(DESTDIR)$(kdedatadir)/apps/color-schemes
145 143 @$(INSTALL_DIR) $(DESTDIR)$(kdedatadir)/apps/konqueror/profiles
146 144 @$(INSTALL_DIR) $(DESTDIR)$(kdedatadir)/apps/konsole
... ... @@ -175,6 +173,7 @@
175 173 cp -a kde/wallpapers/{$(WALLPAPERS)} $(DESTDIR)$(kdewallpapersdir)
176 174 cp -a kde/desktoptheme $(DESTDIR)$(kdeappsdir)/
177 175 $(INSTALL_SCRIPT) bin/kickoffcfg $(DESTDIR)$(kdebindir)/kickoffcfg
  176 + $(INSTALL_SCRIPT) bin/kde5-migrate-user-conf $(DESTDIR)$(bindir)/kde5-migrate-user-conf
178 177  
179 178 install-srpms:
180 179 @$(INSTALL_DIR) $(DESTDIR)$(distrosrpmsdir)
bin/kde5-migrate-user-conf
  1 +#!/bin/bash
  2 +# openmamba simple kde4->kde5 user config migration script
  3 +if [ "$1" = "-f" ]; then
  4 + FORCE=1
  5 +else
  6 + [ -e ~/.kde4/share/config/ -a ! -e ~/.kde4/share/.kde5_conf_migrated ] || exit 0
  7 +fi
  8 +for p in ~/.kde4/share/config/*; do
  9 + [ -L $p ] && continue
  10 + f=`basename $p`
  11 + if [ -e ~/.config/$f ]; then
  12 + if [ "$FORCE" ]; then
  13 + echo "Migrating $p -> ~/.config/$f [forced]"
  14 + mv ~/.config/$f ~/.config/$f.bak
  15 + mv $p ~/.config/ || exit 1
  16 + ln -s ../../../.config/$f $p || exit 1
  17 + fi
  18 + #echo "SKIPPED: $p"
  19 + else
  20 + echo "Migrating $p -> ~/.config/$f"
  21 + mv $p ~/.config/ || exit 1
  22 + ln -s ../../../.config/$f $p || exit 1
  23 + fi
  24 +done
  25 +
  26 +for p in ~/.kde4/share/apps/*; do
  27 + [ -L $p ] && continue
  28 + f=`basename $p`
  29 + if [ -e ~/.local/$f ]; then
  30 + if [ "$FORCE" ]; then
  31 + echo "Migrating $p -> ~/.local/$f [forced]"
  32 + mv ~/.local/$f ~/.local/$f.bak
  33 + mv $p ~/.local/ || exit 1
  34 + ln -s ../../../.local/$f $p || exit 1
  35 + fi
  36 + #echo "SKIPPED: $p"
  37 + else
  38 + echo "Migrating $p -> ~/.local/$f"
  39 + mv $p ~/.local/ || exit 1
  40 + ln -s ../../../.local/$f $p || exit 1
  41 + fi
  42 +done
  43 +touch ~/.kde4/share/.kde5_conf_migrated