51 lines
1.7 KiB
Bash
Executable File
51 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# openmamba simple kde4->kde5 user config migration script
|
|
if [ "$1" = "-f" ]; then
|
|
FORCE=1
|
|
#else
|
|
# [ -e ~/.kde4/share/config/ -a ! -e ~/.kde4/share/.kde5_conf_migrated ] || exit 0
|
|
fi
|
|
for p in ~/.kde4/share/config/*; do
|
|
[ -L $p ] && continue
|
|
f=`basename $p`
|
|
if [ -e ~/.config/$f ]; then
|
|
if [ "$FORCE" ]; then
|
|
echo "Migrating $p -> ~/.config/$f [forced]"
|
|
mv ~/.config/$f ~/.config/$f.bak
|
|
mv $p ~/.config/ || exit 1
|
|
ln -s ../../../.config/$f $p || exit 1
|
|
fi
|
|
#echo "SKIPPED: $p"
|
|
else
|
|
echo "Migrating $p -> ~/.config/$f"
|
|
mv $p ~/.config/ || exit 1
|
|
ln -s ../../../.config/$f $p || exit 1
|
|
fi
|
|
done
|
|
|
|
for p in ~/.kde4/share/apps/*; do
|
|
[ -L $p ] && continue
|
|
f=`basename $p`
|
|
if [ -e ~/.local/share/$f ]; then
|
|
if [ "$FORCE" ]; then
|
|
echo "Migrating $p -> ~/.local/share/$f [forced]"
|
|
mv ~/.local/share/$f ~/.local/share/$f.bak
|
|
mv $p ~/.local/share/ || exit 1
|
|
ln -s ../../../.local/share/$f $p || exit 1
|
|
fi
|
|
#echo "SKIPPED: $p"
|
|
else
|
|
echo "Migrating $p -> ~/.local/share/$f"
|
|
mv $p ~/.local/share || exit 1
|
|
ln -s ../../../.local/share/$f $p || exit 1
|
|
fi
|
|
done
|
|
touch ~/.kde4/share/.kde5_conf_migrated
|
|
# Switch Akonadi db backend from QSQLITE3 to QMYSQL
|
|
if [ "`akonadictl --version | grep \"Akonadi 5\"`" -a -e ~/.config/akonadi/akonadiserverrc ]; then
|
|
grep -q "^Driver=QSQLITE" ~/.config/akonadi/akonadiserverrc && {
|
|
sed -i "s|^Driver=QSQLITE.*|Driver=QMYSQL|" ~/.config/akonadi/akonadiserverrc
|
|
sed -i "s|^ServerPath=/usr/sbin/mysqld|ServerPath=/usr/bin/mysqld|" ~/.config/akonadi/akonadiserverrc
|
|
}
|
|
fi
|