3 prefix
=`kde4-config --localprefix`
4 source="${prefix}/share/config"
5 dest
="${prefix}/share/config/session"
7 # move session config files
9 if [ -n "$prefix" -a -d "$source" ]; then
10 while [ ! -d "$dest" ]; do
12 while [ ! -d `dirname "$dir"` ]; do
15 mkdir
"$dir" ||
exit 1
18 files
=`eval ls -1 "$source/*:[0-9a-f]*" 2> /dev/null`
19 if [ -n "$files" ]; then
21 origfile
=`basename "$i"`
22 newfile
=`echo "$origfile" | sed -e 's^:^_^'`
23 if [ -n "$newfile" -a ! -e "$dest/$newfile" ]; then
24 mv "$source/$origfile" "$dest/$newfile"
30 # update references in ksmserverrc
32 sed -e 's^share/config/\([^/:]*\):^share/config/session/\1_^'