2016-05-19 00:46:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# openmamba simple kde4->kde5 user config migration script
|
|
|
|
if [ "$1" = "-f" ]; then
|
|
|
|
FORCE=1
|
2016-07-01 00:31:06 +02:00
|
|
|
#else
|
|
|
|
# [ -e ~/.kde4/share/config/ -a ! -e ~/.kde4/share/.kde5_conf_migrated ] || exit 0
|
2016-05-19 00:46:08 +02:00
|
|
|
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/$f ]; then
|
|
|
|
if [ "$FORCE" ]; then
|
|
|
|
echo "Migrating $p -> ~/.local/$f [forced]"
|
|
|
|
mv ~/.local/$f ~/.local/$f.bak
|
|
|
|
mv $p ~/.local/ || exit 1
|
|
|
|
ln -s ../../../.local/$f $p || exit 1
|
|
|
|
fi
|
|
|
|
#echo "SKIPPED: $p"
|
|
|
|
else
|
|
|
|
echo "Migrating $p -> ~/.local/$f"
|
|
|
|
mv $p ~/.local/ || exit 1
|
|
|
|
ln -s ../../../.local/$f $p || exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
touch ~/.kde4/share/.kde5_conf_migrated
|