diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /ksmserver/move_session_config.sh | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksmserver/move_session_config.sh')
-rwxr-xr-x | ksmserver/move_session_config.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ksmserver/move_session_config.sh b/ksmserver/move_session_config.sh new file mode 100755 index 000000000..fb8b52526 --- /dev/null +++ b/ksmserver/move_session_config.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +prefix=`kde-config --localprefix` +source="${prefix}/share/config" +dest="${prefix}/share/config/session" + +# move session config files + +if [ -n "$prefix" -a -d "$source" ]; then + while [ ! -d "$dest" ]; do + dir="$dest" + while [ ! -d `dirname "$dir"` ]; do + dir=`dirname "$dir"` + done + mkdir "$dir" || exit 1 + done + + files=`eval ls -1 "$source/*:[0-9a-f]*" 2> /dev/null` + if [ -n "$files" ]; then + for i in $files; do + origfile=`basename "$i"` + newfile=`echo "$origfile" | sed -e 's^:^_^'` + if [ -n "$newfile" -a ! -e "$dest/$newfile" ]; then + mv "$source/$origfile" "$dest/$newfile" + fi + done + fi +fi + +# update references in ksmserverrc + +sed -e 's^share/config/\([^/:]*\):^share/config/session/\1_^' |