summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-11-21 22:11:14 +0100
committerSlávek Banko <slavek.banko@axis.cz>2012-11-21 22:11:14 +0100
commitc6e332016c5908ee44c26469c930e63888e3a2f7 (patch)
tree68cf0c7154abe82910456f2885a475c322abb93d
parent71444cdcbe12e32679e6cadbfd170a8abefe7a36 (diff)
downloadtdebase-c6e332016c5908ee44c26469c930e63888e3a2f7.tar.gz
tdebase-c6e332016c5908ee44c26469c930e63888e3a2f7.zip
Fix migratekde3: added escape for a dot in regular expressions
-rwxr-xr-x[-rw-r--r--]migratekde36
1 files changed, 4 insertions, 2 deletions
diff --git a/migratekde3 b/migratekde3
index 9070013e0..1b42fdcff 100644..100755
--- a/migratekde3
+++ b/migratekde3
@@ -226,6 +226,7 @@ if [ -n "$KDE3_PROFILE" ] && [ -d "$KDE3_PROFILE" ]; then
# I'm using maildir --- do these commands work for mbox too?
echo "Cleaning config files (but not files with user data, e.g. KMail mail files. :-))" 1>&2
echo "Cleaning, first pass..." 1>&2
+ KDE3_PROFILE_R=$(echo $KDE3_PROFILE | sed "s|\.|\\\\.|g")
find $HOME/.trinity \
-path $HOME/.trinity/share/apps/amarok/albumcovers -prune -o \
-path $HOME/.trinity/share/apps/basket/baskets -prune -o \
@@ -239,7 +240,7 @@ if [ -n "$KDE3_PROFILE" ] && [ -d "$KDE3_PROFILE" ]; then
-path $HOME/.trinity/share/apps/knotes -prune -o \
-path $HOME/.trinity/share/apps/kopete/logs -prune -o \
-type f -print0 | \
- xargs -r0 sed -i "s|/${KDE3_PROFILE}|/\.trinity|g"
+ xargs -r0 sed -i "s|/${KDE3_PROFILE_R}|/\.trinity|g"
EXIT_CODE="$?"
if [ "$EXIT_CODE" = "0" ]; then
echo "Done." 1>&2
@@ -310,7 +311,8 @@ if [ -n "$KDE3_PROFILE" ] && [ -d "$KDE3_PROFILE" ]; then
if [ "$?" = "0" ]; then
if [ "$FIREFOX_PNG_LOCATION" != "" ]; then
FIREFOX_PNG_LOCATION_NEW="`grep \"Icon=\" \"$HOME/.trinity/share/apps/kicker/mozilla-firefox.desktop\"`"
- sed -i "s|$FIREFOX_PNG_LOCATION_NEW|$FIREFOX_PNG_LOCATION|" $HOME/.trinity/share/apps/kicker/mozilla-firefox.desktop
+ FIREFOX_PNG_LOCATION_NEW_R=$(echo $FIREFOX_PNG_LOCATION_NEW | sed "s|\.|\\\\.|g")
+ sed -i "s|$FIREFOX_PNG_LOCATION_NEW_R|$FIREFOX_PNG_LOCATION|" $HOME/.trinity/share/apps/kicker/mozilla-firefox.desktop
fi
echo "Done." 1>&2
else